Get unlimited public & private packages + team-based management with npm Teams.Learn more »

github-username

5.0.1 • Public • Published

github-username Build Status

Get a GitHub username from an email address

Install

$ npm install github-username

Usage

const githubUsername = require('github-username');
 
(async () => {
    console.log(await githubUsername('sindresorhus@gmail.com'));
    //=> 'sindresorhus'
})();

API

githubUsername(email, [token])

Returns a Promise<string> with the username.

email

Type: string

Email address for the user of whom you want the username.

token

Type: string

GitHub personal access token.

Related

License

MIT © Sindre Sorhus

Install

npm i github-username

DownloadsWeekly Downloads

307,417

Version

5.0.1

License

MIT

Unpacked Size

4.22 kB

Total Files

5

Last publish

Collaborators

  • avatar