Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/richardlitt/is-github-user-or-org
Determines whether a GitHub profile is a User or an Organization
https://github.com/richardlitt/is-github-user-or-org
api cli github github-api javascript organization user
Last synced: 30 days ago
JSON representation
Determines whether a GitHub profile is a User or an Organization
- Host: GitHub
- URL: https://github.com/richardlitt/is-github-user-or-org
- Owner: RichardLitt
- License: mit
- Created: 2017-03-07T19:16:00.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-30T03:33:49.000Z (about 2 years ago)
- Last Synced: 2024-12-26T11:22:04.976Z (about 1 month ago)
- Topics: api, cli, github, github-api, javascript, organization, user
- Language: JavaScript
- Homepage:
- Size: 598 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 14
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# is-github-user-or-org [![Build Status](https://travis-ci.org/RichardLitt/is-github-user-or-org.svg?branch=master)](https://travis-ci.org/RichardLitt/is-github-user-or-org)
> Determines whether a GitHub profile is a User or an Organization
## Install
```
$ npm install --save is-github-user-or-org
```You also need to get a GitHub application token: https://github.com/settings/tokens. Provide it in the CLI or set it as `$GITHUB_TOKEN` somewhere in your bash_profile.
## Usage
```js
const isGithubUserOrOrg = require('is-github-user-or-org')isGithubUserOrOrg('RichardLitt')
//=> 'User'
```## API
### isGithubUserOrOrg(input)
#### input
Type: `string`
The user or organization you want to check the type of
#### token
Type: token
The GitHub personal access token.
#### endpoint
Type: `string`
The GitHub enterprise endpoint.
## CLI
```
$ npm install --global is-github-user-or-org
``````
$ is-github-user-or-org --helpUsage
$ is-github-user-or-orgOptions
-t, --token A token
-e, --endpoint A GitHub endpoint (for Enterprise)Examples
$ get-github-user RichardLitt
User
$ get-github-user OpenSourceDesign
Organization
```## License
[MIT](license) © 2017 [Richard Littauer](http://burntfen.com)