github-username

Get a GitHub username from an email address

MIT 16 个版本
安装
npm install github-username
yarn add github-username
pnpm add github-username
bun add github-username
README

github-username

Get a GitHub username from an email address

Install

npm install github-username

Usage

import githubUsername from 'github-username';

console.log(await githubUsername('sindresorhus@gmail.com'));
//=> 'sindresorhus'

API

githubUsername(email, options?)

Get the GitHub username from an email address if the email can be found in any commits on GitHub.

Returns a Promise<string?> with the username.

email

Type: string

The email address for the user of whom you want the username.

options

Type: object

token

Type: string

GitHub personal access token.

版本列表
9.0.0 2025-02-20
8.0.0 2023-08-05
7.0.0 2021-10-14
6.0.0 2020-12-23
5.0.1 2019-06-02
5.0.0 2019-04-15
4.1.0 2017-07-01
4.0.0 2017-04-01
3.0.0 2016-08-14
2.1.0 2015-11-14
2.0.0 2015-05-06
1.1.1 2015-01-11
1.1.0 2015-01-11
1.0.0 2014-08-14
0.1.1 2014-03-26
0.1.0 2014-03-26