HEADS UP! Breaking changes in 0.3.0!!!
See the release history for details.
Why another GitHub URL parser library?
Seems like every lib I've found does too much, like both stringifying and parsing, or converts the URL from one format to another, only returns certain segments of the URL except for what I need, yields inconsistent results or has poor coverage.
var gh = require('{%= name %}');
gh('https://github.com/jonschlinkert/micromatch');
Results in:
{
"owner": "jonschlinkert",
"name": "micromatch",
"repo": "jonschlinkert/micromatch",
"branch": "master"
}
Generated results from test fixtures:
{%= renderExamples("support.js") %}
v0.3.0
To be more consistent with node.js/package.json conventions, the following properties were renamed in v0.3.0
:
repo
is nowname
(project name)repopath
is nowrepository
(project repository)user
is nowowner
(project owner or org)