1.0.3 • Published 5 years ago
@feizheng/next-git-url v1.0.3
next-git-url
Get git urls.
installation
npm install -S @feizheng/next-git-urlapis
| property | description | 
|---|---|
| github | Check if is github. | 
| pages | Gh_pages. | 
| url | Git url in its source. | 
| ssh | sshgit url. | 
| https | httpsgit url. | 
| mr | Get merge request url(only support gitlab). | 
usage
import NxGitUrl from '@feizheng/next-git-url';
const url = 'git@github.com:afeiship/next-git-url.git';
const gitUrl = new NxGitUrl(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-urllicense
Code released under the MIT license.