npm.io
5.0.0 • Published 8 years ago

github-username-options

Licence
MIT
Version
5.0.0
Deps
1
Vulns
0
Weekly
0
DeprecatedThis package is deprecated

github-username-options Build Status

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.

email

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.

License

MIT Marco Scabbiolo

Keywords