An open API service indexing awesome lists of open source software.

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.

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' }
```