@simple-libs/hosted-git-info
A small library to parse hosted git info.
Last updated a month ago by dangreen .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @simple-libs/hosted-git-info 
SYNC missed versions from official npm registry.

@simple-libs/hosted-git-info

ESM-only package NPM version Node version Dependencies status Install size Build status Coverage status

A small library to parse hosted git info.

Install

# pnpm
pnpm add @simple-libs/hosted-git-info
# yarn
yarn add @simple-libs/hosted-git-info
# npm
npm i @simple-libs/hosted-git-info

Usage

import { parseHostedGitUrl } from '@simple-libs/hosted-git-info'

parseHostedGitUrl('github:foo/bar')
/* {
  type: 'github',
  url: 'https://github.com/foo/bar',
  host: 'https://github.com',
  owner: 'foo',
  project: 'bar'
} */
parseHostedGitUrl('git+ssh://bitbucket.org:foo/bar.git')
/* {
  type: 'bitbucket',
  url: 'https://bitbucket.org/foo/bar',
  host: 'https://bitbucket.org',
  owner: 'foo',
  project: 'bar'
} */
parseHostedGitUrl('https://user@gitlab.com/foo/bar.git#branch')
/* {
  type: 'gitlab',
  url: 'https://gitlab.com/foo/bar/tree/branch',
  host: 'https://gitlab.com',
  owner: 'foo',
  project: 'bar'
} */

Current Tags

  • 1.0.2                                ...           latest (a month ago)

3 Versions

  • 1.0.2                                ...           a month ago
  • 1.0.1                                ...           10 months ago
  • 1.0.0                                ...           10 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |