Get user info from a GitHub username
$ npm install gh-user
const ghUser = require('gh-user');
(async () => {
console.log(await ghUser('sindresorhus'));
//=> {login: 'sindresorhus', id: 170270, …}
})();
Returns a Promise<Object>
with various user info.
Type: string
GitHub username.
Type: Object
Any gh-got
option. To use a GitHub personal access token, for example, pass in:
{
token: 'YOUR-TOKEN'
}
MIT © Sindre Sorhus