gh-avatar

3.0.0 • Public • Published

gh-avatar

Get the avatar of a GitHub user

Install

npm install gh-avatar

Usage

import ghAvatar from 'gh-avatar';

console.log(await ghAvatar('sindresorhus'));
//=> 'https://avatars.githubusercontent.com/u/170270?v=3'

API

ghAvatar(username, options?)

Returns a Promise<string> with the URL to the avatar.

username

Type: string

GitHub username.

options

Type: object

token

Type: string

GitHub personal access token.

Package Sidebar

Install

npm i gh-avatar

Weekly Downloads

18

Version

3.0.0

License

MIT

Unpacked Size

2.58 kB

Total Files

4

Last publish

Collaborators

  • sindresorhus