npm

npm’s 2019 JavaScript ecosystem survey analysis is now available! Get your copy here »

gh-user

4.0.0 • Public • Published

gh-user Build Status

Get user info from a GitHub username

Install

$ npm install gh-user

Usage

const ghUser = require('gh-user');
 
(async () => {
    console.log(await ghUser('sindresorhus'));
    //=> {login: 'sindresorhus', id: 170270, …}
})();

API

ghUser(username, [options])

username

Type: string

GitHub username.

options

Type: Object

Any gh-got option. To use a GitHub personal access token for example, pass in:

{
    token: 'YOUR-TOKEN'
}

Promise

user

Type: Object

Various user info.

License

MIT © Sindre Sorhus

install

npm i gh-user

Downloadsweekly downloads

42

version

4.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability