@cjser/gh-user
v6.0.0-cjser.2
Published
Get user info from a GitHub username
Maintainers
Readme
gh-user
Get user info from a GitHub username
Install
npm install gh-userUsage
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'
}cjser
This package is a CommonJS-compatible build generated by cjser for projects that still need require() support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.
Original repository: https://github.com/sindresorhus/gh-user
