gh-account-exists
A Node.js module to check if a Github account with the given username exists or not
const ghAccountExists = require('gh-account-exists');
ghAccountExists('shinnn').then(exists => {
console.log(exists);
});
Installation
Use npm.
npm install gh-account-exists
API
const ghAccountExists = require('gh-account-exists');
ghAccountExists(username [, options])
username: String
(a Github username)
options: Object
(gh-get
options)
Return: Promise
The returned promise will be resolved with true
if the account exists, or resolved with false
if it doesn't exist.
ghAccountExists('tim').then(exists => {
console.log(exists);
});
ghAccountExists('nodejs').then(exists => {
console.log(exists);
});
ghAccountExists('mention-bot').then(exists => {
console.log(exists);
});
ghAccountExists('4589iutoiy72euiiujjudjf').then(exists => {
console.log(exists);
});
License
Copyright (c) 2017 Shinnosuke Watanabe
Licensed under the MIT License.