{"_id":"normalize-git-url","_rev":"140569","name":"normalize-git-url","description":"Normalizes Git URLs. For npm, but you can use it too.","dist-tags":{"latest":"3.0.2"},"maintainers":[{"name":"fritzy","email":"fritzy@netflint.net"},{"name":"lukekarrys","email":"luke@lukekarrys.com"}],"time":{"modified":"2021-06-03T11:26:38.000Z","created":"2014-12-25T09:08:29.858Z","3.0.2":"2016-04-08T22:43:25.346Z","3.0.1":"2015-07-16T22:00:48.107Z","3.0.0":"2015-07-16T18:39:54.738Z","2.0.0":"2015-06-25T00:21:03.227Z","1.0.1":"2015-05-22T01:43:36.711Z","1.0.0":"2014-12-25T09:08:29.858Z"},"users":{"bret":true,"iarna":true,"alshamiri1":true,"alshamiri2":true},"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net"},"repository":{"type":"git","url":"git+https://github.com/npm/normalize-git-url.git"},"versions":{"3.0.2":{"name":"normalize-git-url","version":"3.0.2","description":"Normalizes Git URLs. For npm, but you can use it too.","main":"normalize-git-url.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"^1.1.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git+https://github.com/npm/normalize-git-url.git"},"keywords":["git","github","url","normalize","npm"],"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net"},"license":"ISC","bugs":{"url":"https://github.com/npm/normalize-git-url/issues"},"homepage":"https://github.com/npm/normalize-git-url","gitHead":"59553801a9f389857b48e71e9ab54592815f7d15","_id":"normalize-git-url@3.0.2","_shasum":"8e5f14be0bdaedb73e07200310aa416c27350fc4","_from":".","_npmVersion":"3.8.7","_nodeVersion":"4.4.0","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"shasum":"8e5f14be0bdaedb73e07200310aa416c27350fc4","size":3168,"noattachment":false,"key":"/normalize-git-url/-/normalize-git-url-3.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/normalize-git-url/download/normalize-git-url-3.0.2.tgz"},"maintainers":[{"name":"fritzy","email":"fritzy@netflint.net"},{"name":"lukekarrys","email":"luke@lukekarrys.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/normalize-git-url-3.0.2.tgz_1460155404934_0.9728229902684689"},"publish_time":1460155405346,"_cnpm_publish_time":1460155405346,"_hasShrinkwrap":false},"3.0.1":{"name":"normalize-git-url","version":"3.0.1","description":"Normalizes Git URLs. For npm, but you can use it too.","main":"normalize-git-url.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"^1.1.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git+https://github.com/npm/normalize-git-url.git"},"keywords":["git","github","url","normalize","npm"],"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net"},"license":"ISC","bugs":{"url":"https://github.com/npm/normalize-git-url/issues"},"homepage":"https://github.com/npm/normalize-git-url","gitHead":"8393cd4345e404eb6ad2ff6853dcc8287807ca22","_id":"normalize-git-url@3.0.1","_shasum":"d40d419d05a15870271e50534dbb7b8ccd9b0a5c","_from":".","_npmVersion":"3.1.2","_nodeVersion":"2.2.2","_npmUser":{"name":"zkat","email":"kat@sykosomatic.org"},"dist":{"shasum":"d40d419d05a15870271e50534dbb7b8ccd9b0a5c","size":2950,"noattachment":false,"key":"/normalize-git-url/-/normalize-git-url-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/normalize-git-url/download/normalize-git-url-3.0.1.tgz"},"maintainers":[{"name":"fritzy","email":"fritzy@netflint.net"},{"name":"lukekarrys","email":"luke@lukekarrys.com"}],"publish_time":1437084048107,"_cnpm_publish_time":1437084048107,"_hasShrinkwrap":false},"3.0.0":{"name":"normalize-git-url","version":"3.0.0","description":"Normalizes Git URLs. For npm, but you can use it too.","main":"normalize-git-url.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"^1.1.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git+https://github.com/npm/normalize-git-url.git"},"keywords":["git","github","url","normalize","npm"],"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net"},"license":"ISC","bugs":{"url":"https://github.com/npm/normalize-git-url/issues"},"homepage":"https://github.com/npm/normalize-git-url","gitHead":"5db4e64e1f2592477422f34fde9c8aa8ad238611","_id":"normalize-git-url@3.0.0","_shasum":"932b2170efc8c86d228e771a91ba92b05f16bab8","_from":".","_npmVersion":"3.1.2","_nodeVersion":"2.2.2","_npmUser":{"name":"zkat","email":"kat@sykosomatic.org"},"dist":{"shasum":"932b2170efc8c86d228e771a91ba92b05f16bab8","size":2872,"noattachment":false,"key":"/normalize-git-url/-/normalize-git-url-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/normalize-git-url/download/normalize-git-url-3.0.0.tgz"},"maintainers":[{"name":"fritzy","email":"fritzy@netflint.net"},{"name":"lukekarrys","email":"luke@lukekarrys.com"}],"publish_time":1437071994738,"_cnpm_publish_time":1437071994738,"_hasShrinkwrap":false},"2.0.0":{"name":"normalize-git-url","version":"2.0.0","description":"Normalizes Git URLs. For npm, but you can use it too.","main":"normalize-git-url.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"^1.1.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git+https://github.com/npm/normalize-git-url.git"},"keywords":["git","github","url","normalize","npm"],"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net"},"license":"ISC","bugs":{"url":"https://github.com/npm/normalize-git-url/issues"},"homepage":"https://github.com/npm/normalize-git-url","gitHead":"cf9fb245bc25d2a8914b71e8989ec426e7819e00","_id":"normalize-git-url@2.0.0","_shasum":"2cf92aeda24dd2bccf076edef83f4feaf925e436","_from":".","_npmVersion":"2.11.3","_nodeVersion":"2.3.1","_npmUser":{"name":"iarna","email":"me@re-becca.org"},"dist":{"shasum":"2cf92aeda24dd2bccf076edef83f4feaf925e436","size":2783,"noattachment":false,"key":"/normalize-git-url/-/normalize-git-url-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/normalize-git-url/download/normalize-git-url-2.0.0.tgz"},"maintainers":[{"name":"fritzy","email":"fritzy@netflint.net"},{"name":"lukekarrys","email":"luke@lukekarrys.com"}],"publish_time":1435191663227,"_cnpm_publish_time":1435191663227,"_hasShrinkwrap":false},"1.0.1":{"name":"normalize-git-url","version":"1.0.1","description":"Normalizes Git URLs. For npm, but you can use it too.","main":"normalize-git-url.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"^1.1.0"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"git+https://github.com/npm/normalize-git-url.git"},"keywords":["git","github","url","normalize","npm"],"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net"},"license":"ISC","bugs":{"url":"https://github.com/npm/normalize-git-url/issues"},"homepage":"https://github.com/npm/normalize-git-url","gitHead":"d87bf42e845ed664e4a8bab3490052fb44c90433","_id":"normalize-git-url@1.0.1","_shasum":"1b561345d66e3a3bc5513a5ace85f155ca42613e","_from":".","_npmVersion":"2.10.1","_nodeVersion":"2.0.2","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"dist":{"shasum":"1b561345d66e3a3bc5513a5ace85f155ca42613e","size":2813,"noattachment":false,"key":"/normalize-git-url/-/normalize-git-url-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/normalize-git-url/download/normalize-git-url-1.0.1.tgz"},"maintainers":[{"name":"fritzy","email":"fritzy@netflint.net"},{"name":"lukekarrys","email":"luke@lukekarrys.com"}],"publish_time":1432259016711,"_cnpm_publish_time":1432259016711,"_hasShrinkwrap":false},"1.0.0":{"name":"normalize-git-url","version":"1.0.0","description":"Normalizes Git URLs. For npm, but you can use it too.","main":"normalize-git-url.js","directories":{"test":"test"},"dependencies":{},"devDependencies":{"tap":"^0.4.13"},"scripts":{"test":"tap test/*.js"},"repository":{"type":"git","url":"https://github.com/npm/normalize-git-url.git"},"keywords":["git","github","url","normalize","npm"],"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net"},"license":"ISC","bugs":{"url":"https://github.com/npm/normalize-git-url/issues"},"homepage":"https://github.com/npm/normalize-git-url","gitHead":"e51f43718af66ffbced4ccfd9a6514470fc4c553","_id":"normalize-git-url@1.0.0","_shasum":"80e59471f0616b579893973e3f1b3684bedbad48","_from":".","_npmVersion":"2.1.16","_nodeVersion":"0.10.35","_npmUser":{"name":"othiym23","email":"ogd@aoaioxxysz.net"},"maintainers":[{"name":"fritzy","email":"fritzy@netflint.net"},{"name":"lukekarrys","email":"luke@lukekarrys.com"}],"dist":{"shasum":"80e59471f0616b579893973e3f1b3684bedbad48","size":2310,"noattachment":false,"key":"/normalize-git-url/-/normalize-git-url-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/normalize-git-url/download/normalize-git-url-1.0.0.tgz"},"publish_time":1419498509858,"_cnpm_publish_time":1419498509858,"_hasShrinkwrap":false}},"readme":"# normalize-git-url\n\nYou have a bunch of Git URLs. You want to convert them to a canonical\nrepresentation, probably for use inside npm so that it doesn't end up creating\na bunch of superfluous cached origins. You use this package.\n\n## Usage\n\n```javascript\nvar ngu = require('normalize-git-url');\nvar normalized = ngu(\"git+ssh://git@github.com:organization/repo.git#hashbrowns\")\n// get back:\n// {\n//   url : \"ssh://git@github.com/organization/repo.git\",\n//   branch : \"hashbrowns\" // did u know hashbrowns are delicious?\n// }\n```\n\n## API\n\nThere's just the one function, and all it takes is a single parameter, a non-normalized Git URL.\n\n### normalizeGitUrl(url)\n\n* `url` {String} The Git URL (very loosely speaking) to be normalized.\n\nReturns an object with the following format:\n\n* `url` {String} The normalized URL.\n* `branch` {String} The treeish to be checked out once the repo at `url` is\n  cloned. It doesn't have to be a branch, but it's a lot easier to intuit what\n  the output is for with that name.\n\n## Limitations\n\nRight now this doesn't try to special-case GitHub too much -- it doesn't ensure\nthat `.git` is added to the end of URLs, it doesn't prefer `https:` over\n`http:` or `ssh:`, it doesn't deal with redirects, and it doesn't try to\nresolve symbolic names to treeish hashcodes. For now, it just tries to account\nfor minor differences in representation.\n","_attachments":{},"homepage":"https://github.com/npm/normalize-git-url","bugs":{"url":"https://github.com/npm/normalize-git-url/issues"},"license":"ISC"}