package
Parse the github user, repo, branch and other things from a GitHub url.
npm install github-url-parseGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Parse the github user, repo, branch and other things from a GitHub url.
$ npm install --save github-url-parsevar gitHubUrlParse = require('github-url-parse');
var github = gitHubUrlParse('https://github.com/stefanbuck/github-url-parse/blob/master/lib/index.js');
console.log('user:' + github.user); // stefanbuck
console.log('repo:' + github.repo); // github-url-parse
console.log('branch:' + github.branch); // master
console.log('path:' + github.path); // lib/index.js
console.log('type:' + github.type); // blobCopyright (c) 2014 Stefan Buck. Licensed under the MIT license.