3.0.0 • Published 8 years ago
github-token-user v3.0.0
github-token-user
Get the GitHub user from a token
Install
$ npm install --save github-token-user
Usage
const githubTokenUser = require('github-token-user');
githubTokenUser('523ef6911917').then(data => {
console.log(data);
//=> {login: johndoe, id: '1', ...}
});
API
githubTokenUser(token)
Returns a promise for an object
with the user.
token
Required
Type: string
Token to get the user from.
Related
- github-token-user-cli - CLI for this module
License
MIT © Kevin Mårtensson