Package Exports
- github-url-to-object
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (github-url-to-object) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
github-url-to-object
Extract username and repo name from various flavors of GitHub URLs.
Installation
npm install github-url-to-object --save
Usage
require('github-url-to-object')('https://github.com/foo/bar.git');
// -> {user: 'foo', repo: 'git'}
Test
npm test
✓ extracts username and repo from github URL
✓ handles URLs without .git at the end
✓ handles http URLs
✓ handles https URLs
✓ handles git URLs
✓ handles shorthand user/repo paths
License
WTFPL