gh-user
TypeScript icon, indicating that this package has built-in type declarations

6.0.0 • Public • Published

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

Package Sidebar

Install

npm i gh-user

Weekly Downloads

33

Version

6.0.0

License

MIT

Unpacked Size

3.67 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus