Get user info from a GitHub username
npm install gh-user
import ghUser from 'gh-user';
console.log(await ghUser('sindresorhus'));
//=> {login: 'sindresorhus', id: 170270, …}
Returns a Promise<object>
with various user info.
Type: string
GitHub username.
Type: object
Any Octokit options.
To use a GitHub personal access token, for example, pass in:
{
token: 'YOUR-TOKEN'
}