5.0.0 • Published 6 years ago
github-username-options v5.0.0
github-username-options
Get a GitHub username from an email address
Based on github-username but allows you to provide additional options to customize how the HTTP request is performed so you can, for example, use this module behind a proxy. At any moment this module can be merged back into the original one and deprecated, see this PR for more information.
Install
$ npm install github-username-options
Usage
const githubUsername = require('github-username-options');
githubUsername('sindresorhus@gmail.com').then(username => {
console.log(username);
//=> 'sindresorhus'
});
API
githubUsername(email, token, options)
Returns a Promise
for the username.
Type: string
Email address for the user of whom you want the username.
token
Type: string
GitHub personal access token.
options
Type: object
Additional http-request
options to use.
Related
- github-username-cli - CLI for this module
License
MIT © Marco Scabbiolo
5.0.0
6 years ago