gh-avatar
v3.0.0
Published
Get the avatar of a GitHub user
Downloads
22
Maintainers
Readme
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.