Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 1011 Bytes

.verb.md

File metadata and controls

43 lines (29 loc) · 1011 Bytes

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.

Usage

var gh = require('{%= name %}');
gh('https://github.com/jonschlinkert/micromatch');

Results in:

{
  "owner": "jonschlinkert",
  "name": "micromatch",
  "repo": "jonschlinkert/micromatch",
  "branch": "master"
}

Example results

Generated results from test fixtures:

{%= renderExamples("support.js") %}

History

v0.3.0

To be more consistent with node.js/package.json conventions, the following properties were renamed in v0.3.0:

  • repo is now name (project name)
  • repopath is now repository (project repository)
  • user is now owner (project owner or org)