@bahmutov/parse-github-repo-url

Parse a GitHub URL for user/project@version

All features were merged back into original parse-github-repo-url
Last updated 5 years ago by bahmutov .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @bahmutov/parse-github-repo-url 
SYNC missed versions from official npm registry.

DEPRECATED - all features were merged back into

original repo repo-utils/parse-github-repo-url

available on NPM under "parse-github-repo-url"

@bahmutov/parse-github-repo-url

Parse a GitHub URL for user/project@version

NPM info

Build semantic-release manpm

Note: this is a clone of repo-utils/parse-github-repo-url with additional parsers, since my pull request was in limbo for a very long time.

Features

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
  • git@ and https:git@
  • www.github.com
  • gitlab.<my company name>.com/user/repo.git parsing
  • 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('@bahmutov/parse-github-repo-url')
parse('component/emitter#1') // => ['component', 'emitter', '1']

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

Current Tags

  • 0.1.2                                ...           latest (5 years ago)

5 Versions

  • 0.1.2 [deprecated]           ...           5 years ago
  • 0.1.1 [deprecated]           ...           5 years ago
  • 0.1.0 [deprecated]           ...           5 years ago
  • 0.0.0 [deprecated]           ...           5 years ago
  • 0.0.0-semantic-release                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 15
This Month 25
Last Day 0
Last Week 10
Last Month 106
Dependencies (0)
None
Dev Dependencies (3)

Copyright 2014 - 2016 © taobao.org |