Socket
Socket
Sign inDemoInstall

gh-account-exists

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gh-account-exists

Check if a Github account with the given username exists or not


Version published
Maintainers
1
Created
Source

gh-account-exists

NPM version Build Status Coverage Status

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); // true
});

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.

// User account
ghAccountExists('tim').then(exists => {
  console.log(exists); // true
});

// Organization account
ghAccountExists('nodejs').then(exists => {
  console.log(exists); // true
});

// Bot account
ghAccountExists('mention-bot').then(exists => {
  console.log(exists); // true
});

// Account that doesn't exist
ghAccountExists('4589iutoiy72euiiujjudjf').then(exists => {
  console.log(exists); // false
});

License

Copyright (c) 2017 Shinnosuke Watanabe

Licensed under the MIT License.

Keywords

FAQs

Package last updated on 18 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc