{"_id":"github-url-from-git","_rev":"12399","name":"github-url-from-git","description":"Parse a github git url and return the github repo url","dist-tags":{"latest":"1.5.0"},"maintainers":[{"name":"bcoe","email":"bencoe@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"time":{"modified":"2021-06-03T09:58:12.000Z","created":"2013-04-06T15:10:58.091Z","1.5.0":"2016-11-27T01:57:43.364Z","1.4.0":"2014-08-21T17:48:43.036Z","1.3.0":"2014-07-31T18:02:24.850Z","1.2.0":"2014-07-15T00:50:39.199Z","1.1.1":"2013-04-23T17:46:24.097Z","1.1.0":"2013-04-20T02:37:25.745Z","1.0.0":"2013-04-06T15:24:50.998Z","0.0.1":"2013-04-06T15:10:58.091Z"},"users":{"bcoe":true},"author":{"name":"TJ Holowaychuk"},"repository":{"type":"git","url":"git+https://github.com/visionmedia/node-github-url-from-git.git"},"versions":{"1.5.0":{"name":"github-url-from-git","version":"1.5.0","description":"Parse a github git url and return the github repo url","main":"index.js","scripts":{"pretest":"standard","test":"nyc mocha test.js --reporter spec --require should","release":"standard-version"},"repository":{"type":"git","url":"git+https://github.com/visionmedia/node-github-url-from-git.git"},"keywords":["github","git","url","parser"],"author":{"name":"TJ Holowaychuk"},"license":"MIT","devDependencies":{"better-assert":"^1.0.2","mocha":"^3.2.0","nyc":"^10.0.0","should":"^11.1.1","standard":"^8.6.0","standard-version":"^4.0.0-1"},"gitHead":"486ed80c20edb9cc3cc8accd4c020daa8431e1d2","bugs":{"url":"https://github.com/visionmedia/node-github-url-from-git/issues"},"homepage":"https://github.com/visionmedia/node-github-url-from-git#readme","_id":"github-url-from-git@1.5.0","_shasum":"f985fedcc0a9aa579dc88d7aff068d55cc6251a0","_from":".","_npmVersion":"3.10.9","_nodeVersion":"7.1.0","_npmUser":{"name":"bcoe","email":"ben@npmjs.com"},"dist":{"shasum":"f985fedcc0a9aa579dc88d7aff068d55cc6251a0","size":2772,"noattachment":false,"key":"/github-url-from-git/-/github-url-from-git-1.5.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/github-url-from-git/download/github-url-from-git-1.5.0.tgz"},"maintainers":[{"name":"bcoe","email":"bencoe@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/github-url-from-git-1.5.0.tgz_1480211862826_0.27994470158591866"},"directories":{},"publish_time":1480211863364,"_cnpm_publish_time":1480211863364,"_hasShrinkwrap":false},"1.4.0":{"name":"github-url-from-git","version":"1.4.0","description":"Parse a github git url and return the github repo url","main":"index.js","scripts":{"test":"mocha test.js --reporter spec --require should"},"repository":{"type":"git","url":"https://github.com/visionmedia/node-github-url-from-git.git"},"keywords":["github","git","url","parser"],"author":{"name":"TJ Holowaychuk"},"license":"MIT","devDependencies":{"better-assert":"~1.0.0","mocha":"~1.9.0","should":"~1.2.2"},"gitHead":"154df00b0b590c29be5d2a5822e7b2e160b75345","bugs":{"url":"https://github.com/visionmedia/node-github-url-from-git/issues"},"homepage":"https://github.com/visionmedia/node-github-url-from-git","_id":"github-url-from-git@1.4.0","_shasum":"285e6b520819001bde128674704379e4ff03e0de","_from":".","_npmVersion":"2.0.0-alpha.7","_npmUser":{"name":"bcoe","email":"bencoe@gmail.com"},"maintainers":[{"name":"bcoe","email":"bencoe@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"dist":{"shasum":"285e6b520819001bde128674704379e4ff03e0de","size":2433,"noattachment":false,"key":"/github-url-from-git/-/github-url-from-git-1.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/github-url-from-git/download/github-url-from-git-1.4.0.tgz"},"directories":{},"publish_time":1408643323036,"_cnpm_publish_time":1408643323036,"_hasShrinkwrap":false},"1.3.0":{"name":"github-url-from-git","version":"1.3.0","description":"Parse a github git url and return the github repo url","main":"index.js","scripts":{"test":"mocha test.js --reporter spec --require should"},"repository":{"type":"git","url":"https://github.com/visionmedia/node-github-url-from-git.git"},"keywords":["github","git","url","parser"],"author":{"name":"TJ Holowaychuk"},"license":"MIT","devDependencies":{"better-assert":"~1.0.0","mocha":"~1.9.0","should":"~1.2.2"},"gitHead":"d92a033d7e769264f17ae8ef4409e6a31e0cd016","bugs":{"url":"https://github.com/visionmedia/node-github-url-from-git/issues"},"homepage":"https://github.com/visionmedia/node-github-url-from-git","_id":"github-url-from-git@1.3.0","_shasum":"6e79d9779632ca78aa645c67bb419f70e51d69f7","_from":".","_npmVersion":"1.5.0-alpha-4","_npmUser":{"name":"bcoe","email":"bencoe@gmail.com"},"maintainers":[{"name":"bcoe","email":"bencoe@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"dist":{"shasum":"6e79d9779632ca78aa645c67bb419f70e51d69f7","size":2402,"noattachment":false,"key":"/github-url-from-git/-/github-url-from-git-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/github-url-from-git/download/github-url-from-git-1.3.0.tgz"},"directories":{},"publish_time":1406829744850,"_cnpm_publish_time":1406829744850,"_hasShrinkwrap":false},"1.2.0":{"name":"github-url-from-git","version":"1.2.0","description":"Parse a github git url and return the github repo url","main":"index.js","scripts":{"test":"mocha test.js --reporter spec --require should"},"repository":{"type":"git","url":"http://github.com/visionmedia/node-github-url-from-git"},"keywords":["github","git","url","parser"],"author":{"name":"TJ Holowaychuk"},"license":"MIT","devDependencies":{"better-assert":"~1.0.0","mocha":"~1.9.0","should":"~1.2.2"},"gitHead":"9df854a2060868c374c32a6be4c10e12e5b41152","bugs":{"url":"https://github.com/visionmedia/node-github-url-from-git/issues"},"homepage":"https://github.com/visionmedia/node-github-url-from-git","_id":"github-url-from-git@1.2.0","_shasum":"7ace1fc6920f790d2967faed61688902320c37d2","_from":".","_npmVersion":"1.5.0-alpha-1","_npmUser":{"name":"bcoe","email":"bencoe@gmail.com"},"maintainers":[{"name":"bcoe","email":"bencoe@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"dist":{"shasum":"7ace1fc6920f790d2967faed61688902320c37d2","size":2304,"noattachment":false,"key":"/github-url-from-git/-/github-url-from-git-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/github-url-from-git/download/github-url-from-git-1.2.0.tgz"},"directories":{},"publish_time":1405385439199,"_cnpm_publish_time":1405385439199,"_hasShrinkwrap":false},"1.1.1":{"name":"github-url-from-git","version":"1.1.1","description":"Parse a github git url and return the github repo url","main":"index.js","scripts":{"test":"mocha test.js --reporter spec --require should"},"repository":"","keywords":["github","git","url","parser"],"author":"","license":"MIT","devDependencies":{"better-assert":"~1.0.0","mocha":"~1.9.0","should":"~1.2.2"},"readmeFilename":"Readme.md","_id":"github-url-from-git@1.1.1","dist":{"shasum":"1f89623453123ef9623956e264c60bf4c3cf5ccf","size":1186,"noattachment":false,"key":"/github-url-from-git/-/github-url-from-git-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/github-url-from-git/download/github-url-from-git-1.1.1.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"bcoe","email":"bencoe@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"publish_time":1366739184097,"_hasShrinkwrap":false,"_cnpm_publish_time":1366739184097},"1.1.0":{"name":"github-url-from-git","version":"1.1.0","description":"Parse a github git url and return the github repo url","main":"index.js","scripts":{"test":"mocha test.js --reporter spec --require should"},"repository":"","keywords":["github","git","url","parser"],"author":"","license":"MIT","dependencies":{"better-assert":"~1.0.0","mocha":"~1.9.0","should":"~1.2.2"},"readmeFilename":"Readme.md","_id":"github-url-from-git@1.1.0","dist":{"shasum":"3a4562c249cbcf8b4498c887c29e158512725e7e","size":1149,"noattachment":false,"key":"/github-url-from-git/-/github-url-from-git-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/github-url-from-git/download/github-url-from-git-1.1.0.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"bcoe","email":"bencoe@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"publish_time":1366425445745,"_hasShrinkwrap":false,"_cnpm_publish_time":1366425445745},"1.0.0":{"name":"github-url-from-git","version":"1.0.0","description":"Parse a github git url and return the github repo url","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":"","keywords":["github","git","url","parser"],"author":"","license":"MIT","dependencies":{"better-assert":"~1.0.0","mocha":"~1.9.0","should":"~1.2.2"},"readmeFilename":"Readme.md","_id":"github-url-from-git@1.0.0","dist":{"shasum":"f8e58a5c2036f11e7c307d02e472d8eeb67b6383","size":1016,"noattachment":false,"key":"/github-url-from-git/-/github-url-from-git-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/github-url-from-git/download/github-url-from-git-1.0.0.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"bcoe","email":"bencoe@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"publish_time":1365261890998,"_hasShrinkwrap":false,"_cnpm_publish_time":1365261890998},"0.0.1":{"name":"github-url-from-git","version":"0.0.1","description":"Parse a github git url and return the github repo url","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":"","keywords":["github","git","url","parser"],"author":"","license":"MIT","dependencies":{"better-assert":"~1.0.0","mocha":"~1.9.0","should":"~1.2.2"},"readmeFilename":"Readme.md","_id":"github-url-from-git@0.0.1","dist":{"shasum":"8628e109c503bfca0f0e7623a51c9ade8ba72c7a","size":947,"noattachment":false,"key":"/github-url-from-git/-/github-url-from-git-0.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/github-url-from-git/download/github-url-from-git-0.0.1.tgz"},"_from":".","_npmVersion":"1.2.14","_npmUser":{"name":"tjholowaychuk","email":"tj@vision-media.ca"},"maintainers":[{"name":"bcoe","email":"bencoe@gmail.com"},{"name":"tjholowaychuk","email":"tj@vision-media.ca"}],"directories":{},"publish_time":1365261058091,"_hasShrinkwrap":false,"_cnpm_publish_time":1365261058091}},"readme":"\n# github-url-from-git\n\n```js\ndescribe('parse(url)', function () {\n  it('should support git://*', function () {\n    var url = 'git://github.com/jamesor/mongoose-versioner'\n    parse(url).should.equal('https://github.com/jamesor/mongoose-versioner')\n  })\n\n  it('should support git://*.git', function () {\n    var url = 'git://github.com/treygriffith/cellar.git'\n    parse(url).should.equal('https://github.com/treygriffith/cellar')\n  })\n\n  it('should support https://*', function () {\n    var url = 'https://github.com/Empeeric/i18n-node'\n    parse(url).should.equal('https://github.com/Empeeric/i18n-node')\n  })\n\n  it('should support https://*.git', function () {\n    var url = 'https://jpillora@github.com/banchee/tranquil.git'\n    parse(url).should.equal('https://github.com/banchee/tranquil')\n  })\n\n  it('should return undefined on failure', function () {\n    var url = 'git://github.com/justgord/.git'\n    assert(parse(url) == null)\n  })\n\n  it('should parse git@github.com:bcoe/thumbd.git', function () {\n    var url = 'git@github.com:bcoe/thumbd.git'\n    parse(url).should.eql('https://github.com/bcoe/thumbd')\n  })\n\n  it('should parse git@github.com:/bcoe/thumbd.git', function () {\n    var url = 'git@github.com:/bcoe/thumbd.git'\n    parse(url).should.eql('https://github.com/bcoe/thumbd')\n  })\n\n  it('should parse git@github.com:bcoe/thumbd.git#2.7.0', function () {\n    var url = 'git@github.com:bcoe/thumbd.git#2.7.0'\n    parse(url).should.eql('https://github.com/bcoe/thumbd')\n  })\n\n  it('should parse git+https://github.com/bcoe/thumbd.git', function () {\n    var url = 'git+https://github.com/bcoe/thumbd.git'\n    parse(url).should.eql('https://github.com/bcoe/thumbd')\n  })\n\n  it('should parse git+ssh://github.com/bcoe/thumbd.git', function () {\n    var url = 'git+ssh://github.com/bcoe/thumbd.git'\n    parse(url).should.eql('https://github.com/bcoe/thumbd')\n  })\n\n  it('should parse https://EastCloud@github.com/EastCloud/node-websockets.git', function () {\n    var url = 'https://EastCloud@github.com/EastCloud/node-websockets.git'\n    parse(url).should.eql('https://github.com/EastCloud/node-websockets')\n  })\n\n  // gist urls.\n\n  it('should parse git@gist urls', function () {\n    var url = 'git@gist.github.com:3135914.git'\n    parse(url).should.equal('https://gist.github.com/3135914')\n  })\n\n  it('should parse https://gist urls', function () {\n    var url = 'https://gist.github.com/3135914.git'\n    parse(url).should.equal('https://gist.github.com/3135914')\n  })\n\n  // Handle arbitrary GitHub Enterprise domains.\n\n  it('should parse parse extra GHE urls provided', function () {\n    var url = 'git://github.example.com/treygriffith/cellar.git'\n    parse(\n      url, {extraBaseUrls: ['github.example.com']}\n    ).should.equal('https://github.example.com/treygriffith/cellar')\n  })\n\n  it('should parse GHE urls with multiple subdomains', function () {\n    var url = 'git://github.internal.example.com/treygriffith/cellar.git'\n    parse(\n      url, {extraBaseUrls: ['github.internal.example.com']}\n    ).should.equal('https://github.internal.example.com/treygriffith/cellar')\n  })\n})\n\ndescribe('re', function () {\n  it('should expose GitHub url parsing regex', function () {\n    parse.re.source.should.equal(\n      /^(?:https?:\\/\\/|git:\\/\\/|git\\+ssh:\\/\\/|git\\+https:\\/\\/)?(?:[^@]+@)?(gist.github.com|github.com)(?::\\/?|\\/)([^/]+\\/[^/]+?|[0-9]+)$/.source\n    )\n  })\n})\n```\n","_attachments":{},"homepage":"https://github.com/visionmedia/node-github-url-from-git#readme","bugs":{"url":"https://github.com/visionmedia/node-github-url-from-git/issues"},"license":"MIT"}