Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@jswork/next-git-url

afeiship81MIT1.1.1

Get git urls.

next, git, url, http, ssh, pages

readme

next-git-url

Get git urls.

version license size download

installation

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

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.