JSPM

parse-github-repo-url

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 555159
  • Score
    100M100P100Q193506F
  • License MIT

Parse a GitHub URL for user/project@version

Package Exports

  • parse-github-repo-url

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (parse-github-repo-url) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Parse GitHub Repo URL

Parse all the stupid ways you could write a GitHub URL in your damn package.json. Supports:

  • <user>/<repo#<commit>
  • git:// and .git w/ #commit or @version
  • All 5 different ways you could download a freaking tarball/zipball

API

[user, repo, version] = parse(url)

version could be falsey, a semantic version, a commit, or a branch, etc.

var parse = require('parse-github-repo-url')
parse('component/emitter#1') // => ['component', 'emitter', '1']

See the tests for all the different types of supported URLs.