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