https://github.com/stefanbuck/github-url-parse
Parse the github user, repo, branch and other things from a GitHub url.
https://github.com/stefanbuck/github-url-parse
Last synced: 4 months ago
JSON representation
Parse the github user, repo, branch and other things from a GitHub url.
- Host: GitHub
- URL: https://github.com/stefanbuck/github-url-parse
- Owner: stefanbuck
- Created: 2014-07-09T20:01:11.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-07-09T21:03:01.000Z (almost 11 years ago)
- Last Synced: 2025-02-01T14:51:10.900Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 137 KB
- Stars: 8
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# github-url-parse
[![NPM version][npm-image]][npm-url] [![Build Status][travis-image]][travis-url] [![Dependency Status][daviddm-url]][daviddm-image] [![Coverage Status][coveralls-image]][coveralls-url]Parse the github user, repo, branch and other things from a GitHub url.
## Install
```bash
$ npm install --save github-url-parse
```## Usage
```javascript
var 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); // blob
```## License
Copyright (c) 2014 Stefan Buck. Licensed under the MIT license.
[npm-url]: https://npmjs.org/package/github-url-parse
[npm-image]: https://badge.fury.io/js/github-url-parse.svg
[travis-url]: https://travis-ci.org/stefanbuck/github-url-parse
[travis-image]: https://travis-ci.org/stefanbuck/github-url-parse.svg?branch=master
[daviddm-url]: https://david-dm.org/stefanbuck/github-url-parse.svg?theme=shields.io
[daviddm-image]: https://david-dm.org/stefanbuck/github-url-parse
[coveralls-url]: https://coveralls.io/r/stefanbuck/github-url-parse
[coveralls-image]: https://coveralls.io/repos/stefanbuck/github-url-parse/badge.png