5.0.0 • Published 6 years ago

github-username-options v5.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

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.

Related

License

MIT © Marco Scabbiolo