JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 840942
  • Score
    100M100P100Q234376F
  • License MIT

Get a GitHub username from an email address

Package Exports

  • github-username

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (github-username) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

github-username Build Status

Get a GitHub username from an email address

Install

$ npm install --save github-username

Usage

var githubUsername = require('github-username');

githubUsername('sindresorhus@gmail.com', function (err, username) {
    console.log(username);
    //=> 'sindresorhus'
});

API

githubUsername(email, [token], callback)

email

Required
Type: string

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

token

Type: string

GitHub personal access token.

callback(err, username)

CLI

You can also use it as a CLI app by installing it globally:

$ npm install --global github-username

Usage

$ github-username --help

Usage
  $ github-username <email> [--token OAUTH-TOKEN]
  $ echo <email> | github-username

Example
  $ github-username sindresorhus@gmail.com
  sindresorhus

License

MIT © Sindre Sorhus