{"name":"normalize-git-url","version":"3.0.0","keywords":["git","github","url","normalize","npm"],"author":{"name":"Forrest L Norvell","email":"ogd@aoaioxxysz.net"},"license":"ISC","_id":"normalize-git-url@3.0.0","maintainers":[{"name":"othiym23","email":"ogd@aoaioxxysz.net"},{"name":"iarna","email":"me@re-becca.org"},{"name":"zkat","email":"kat@sykosomatic.org"}],"homepage":"https://github.com/npm/normalize-git-url","bugs":{"url":"https://github.com/npm/normalize-git-url/issues"},"dist":{"shasum":"932b2170efc8c86d228e771a91ba92b05f16bab8","tarball":"http://registry-npm.ywwl.com/normalize-git-url/download/normalize-git-url-3.0.0.tgz","integrity":"sha512-pI/VsM5I0nme9Y2JIxSwMeIVLGot3xRukqrxT1CgAKfh46MwYsfnxh4eOVWNdbwDclpCCLldykZOUb7PWElx+g==","signatures":[{"sig":"MEYCIQDf8GCjvNB7qlJadpzuiBJUDGzDWEaaST4leywKoGkjIQIhAKYNVriDqSXa0p3xJ5kW6p7bcaVZs2hE4dK2D5JfhFx8","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"size":2872,"noattachment":false,"key":"/normalize-git-url/-/normalize-git-url-3.0.0.tgz"},"main":"normalize-git-url.js","_from":".","_shasum":"932b2170efc8c86d228e771a91ba92b05f16bab8","gitHead":"5db4e64e1f2592477422f34fde9c8aa8ad238611","scripts":{"test":"tap test/*.js"},"_npmUser":{"name":"zkat","email":"kat@sykosomatic.org"},"deprecated":"This package is no longer supported.","repository":{"url":"git+https://github.com/npm/normalize-git-url.git","type":"git"},"_npmVersion":"3.1.2","description":"Normalizes Git URLs. For npm, but you can use it too.","directories":{"test":"test"},"_nodeVersion":"2.2.2","dependencies":{},"devDependencies":{"tap":"^1.1.0"},"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","publish_time":1437071994738,"_cnpm_publish_time":1437071994738,"dist-tags":{"latest":"3.0.2"}}