npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

gh-avatar

3.0.0

@sindresorhus

npmHomeRepoSnykSocket
Downloads:11
$ npm install gh-avatar
DailyWeeklyMonthlyYearly

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.