github-username

WebJar for github-username

License

License

MIT
Categories

Categories

Github Development Tools Version Controls
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

github-username
Last Version

Last Version

4.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

github-username
WebJar for github-username
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/sindresorhus/github-username

Download github-username

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-username/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-username</artifactId>
    <version>4.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-username/
implementation 'org.webjars.npm:github-username:4.1.0'
// https://jarcasting.com/artifacts/org.webjars.npm/github-username/
implementation ("org.webjars.npm:github-username:4.1.0")
'org.webjars.npm:github-username:jar:4.1.0'
<dependency org="org.webjars.npm" name="github-username" rev="4.1.0">
  <artifact name="github-username" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-username', version='4.1.0')
)
libraryDependencies += "org.webjars.npm" % "github-username" % "4.1.0"
[org.webjars.npm/github-username "4.1.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : gh-got jar [6.0.0,7)

Project Modules

There are no modules declared in this project.

github-username

Get a GitHub username from an email address

Install

$ npm install github-username

Usage

const githubUsername = require('github-username');

(async () => {
	console.log(await githubUsername('[email protected]'));
	//=> 'sindresorhus'
})();

API

githubUsername(email, token?)

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

Email address for the user of whom you want the username.

token

Type: string

GitHub personal access token.

Related

Versions

Version
4.1.0