gh-user

Get user info from a GitHub username


Keywords
github, gh, user, username, info, api
License
MIT
Install
npm install gh-user@6.0.0

Documentation

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'
}