github-username
TypeScript icon, indicating that this package has built-in type declarations

8.0.0 • Public • Published

github-username

Get a GitHub username from an email address

Install

npm install github-username

Usage

import githubUsername from 'github-username';

console.log(await githubUsername('sindresorhus@gmail.com'));
//=> 'sindresorhus'

API

githubUsername(email, options?)

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.

email

Type: string

The email address for the user of whom you want the username.

options

Type: object

token

Type: string

GitHub personal access token.

Related

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 8.0.0
    93
    • latest

Version History

Package Sidebar

Install

npm i github-username

Weekly Downloads

713,101

Version

8.0.0

License

MIT

Unpacked Size

4.21 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus