1.1.0 • Published 9 years ago

gh-repo-to-user v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

gh-repo-to-user

Build status NPM version js-xo-style

Get GitHub username from a repo, accepting repos like package.json's repository field

Installation

Install gh-repo-to-user using npm:

npm install --save gh-repo-to-user

Usage

Module usage

var ghRepoToUser = require('gh-repo-to-user');

ghRepoToUser('joakimbeng/repo');
// "joakimbeng"
ghRepoToUser({type: 'git', url: 'https://github.com/joakimbeng/repo.git'});
// "joakimbeng"

API

ghRepoToUser(repo)

NameTypeDescription
repoString|ObjectThe repository to get GitHub username from

Returns: String or NULL if not found.

License

MIT © Joakim Carlstein

1.1.0

9 years ago

1.0.0

9 years ago