https://github.com/aoki/git-origin-parser
git-origin-parser is to parse git URI and return JS object.
https://github.com/aoki/git-origin-parser
git javascript npm
Last synced: 3 months ago
JSON representation
git-origin-parser is to parse git URI and return JS object.
- Host: GitHub
- URL: https://github.com/aoki/git-origin-parser
- Owner: aoki
- Created: 2018-03-16T03:04:28.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-04T05:50:50.000Z (over 8 years ago)
- Last Synced: 2025-09-22T04:47:35.939Z (10 months ago)
- Topics: git, javascript, npm
- Language: JavaScript
- Homepage:
- Size: 45.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# git-origin-parser
`git-origin-parser` is to parse git URI and return JS object.
Support protocol is `file://`, `git://`, `ssh://` and `http(s)://`.
## Install
```bash
npm install git-origin-parser
```
## How to Use
```js
const parse = require('git-origin-parser');
const origin = parse('https://github.com/ringohub.git-origin-parser.git');
```
`origin` object is below.
```js
{ type: 'https',
domain: 'github.com',
path: 'ringohub.git-origin-parser' }
```