0.0.0-3 • Published 3 months ago

@vltpkg/git-scp-url v0.0.0-3

Weekly downloads
-
License
BSD-2-Clause-Pate...
Repository
github
Last release
3 months ago

git-scp-url

@vltpkg/git-scp-url

Utility function for parsing git "scp-style" URLs, like git:git@github.com:user/repo or git+ssh://github.com:user/repo.

Usage

import { gitScpURL } from '@vltpkg/git-scp-url'

console.log(gitScpURL('git@github.com:user/repo'))

/*
URL {
  href: 'git+ssh://git@github.com/user/repo',
  // NB: this is only set if the url is http: or https:
  origin: 'null',
  protocol: 'git+ssh:',
  username: 'git',
  password: '',
  host: 'github.com',
  hostname: 'github.com',
  port: '',
  pathname: '/user/repo',
  search: '',
  searchParams: URLSearchParams {},
  hash: ''
}
*/
0.0.0-3

3 months ago

0.0.0-2

3 months ago