github-username
Version:
Get a GitHub username from an email address
47 lines (26 loc) • 793 B
Markdown
from an email address
```sh
npm install github-username
```
```js
import githubUsername from 'github-username';
console.log(await githubUsername('sindresorhus@gmail.com'));
//=> 'sindresorhus'
```
Get the GitHub username from an email address if the email can be found in any commits on GitHub.
Returns a `Promise<string?>` with the username.
Type: `string`
The email address for the user of whom you want the username.
Type: `object`
Type: `string`
GitHub [personal access token](https://github.com/settings/tokens/new).
- [github-username-cli](https://github.com/sindresorhus/github-username-cli) - CLI for this module
> Get a GitHub username