https://github.com/afeiship/next-git-url
Get git urls.
https://github.com/afeiship/next-git-url
git http next pages ssh url
Last synced: about 1 year ago
JSON representation
Get git urls.
- Host: GitHub
- URL: https://github.com/afeiship/next-git-url
- Owner: afeiship
- License: mit
- Created: 2020-07-29T13:32:21.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-02-26T15:05:46.000Z (about 2 years ago)
- Last Synced: 2025-01-06T08:08:33.659Z (over 1 year ago)
- Topics: git, http, next, pages, ssh, url
- Language: JavaScript
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# next-git-url
> Get git urls.
[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]
## installation
```bash
npm install -S @jswork/next-git-url
```
## apis
| property | description |
| -------- | ------------------------------------------- |
| github | Check if is github. |
| pages | Gh_pages. |
| url | Git url in its source. |
| ssh | `ssh` git url. |
| https | `https` git url. |
| mr | Get merge request url(only support gitlab). |
## usage
```js
import '@jswork/next-git-url';
const url = 'git@github.com:afeiship/next-git-url.git';
const gitUrl = new nx.GitUrl(url);
const { github, pages, url, ssh, https } = gitUrl;
// true
// https://afeiship.github.io/next-git-url/
// git@github.com:afeiship/next-git-url.git
// https://github.com/afeiship/next-git-url.git
// https://github.com/afeiship/next-git-url
```
## license
Code released under [the MIT license](https://github.com/afeiship/next-git-url/blob/master/LICENSE.txt).
[version-image]: https://img.shields.io/npm/v/@jswork/next-git-url
[version-url]: https://npmjs.org/package/@jswork/next-git-url
[license-image]: https://img.shields.io/npm/l/@jswork/next-git-url
[license-url]: https://github.com/afeiship/next-git-url/blob/master/LICENSE.txt
[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-git-url
[size-url]: https://github.com/afeiship/next-git-url/blob/master/dist/next-git-url.min.js
[download-image]: https://img.shields.io/npm/dm/@jswork/next-git-url
[download-url]: https://www.npmjs.com/package/@jswork/next-git-url