github-url-to-object
Advanced tools
Comparing version 2.2.3 to 2.2.4
@@ -40,3 +40,3 @@ 'use strict' | ||
if (!parsedURL.hostname) return null | ||
if (parsedURL.hostname !== 'github.com' && !opts.enterprise) return null | ||
if (parsedURL.hostname !== 'github.com' && parsedURL.hostname !== 'www.github.com' && !opts.enterprise) return null | ||
@@ -43,0 +43,0 @@ var parts = parsedURL.pathname.match(/^\/([\w-_]+)\/([\w-_\.]+)(\/tree\/[\w-_\.\/]+)?(\/blob\/[\w-_\.\/]+)?/) |
{ | ||
"name": "github-url-to-object", | ||
"version": "2.2.3", | ||
"version": "2.2.4", | ||
"description": "Extract user, repo, and other interesting properties from GitHub URLs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -113,2 +113,8 @@ /* globals before, describe, it */ | ||
it('supports URLs with www', function () { | ||
var obj = gh('https://www.github.com/zeke/outlet') | ||
assert.equal(obj.user, 'zeke') | ||
assert.equal(obj.repo, 'outlet') | ||
}) | ||
it('supports deep URLs', function () { | ||
@@ -115,0 +121,0 @@ var obj = gh('https://github.com/zeke/ruby-rails-sample/blob/b1e1000fedb6ca448dd78702de4fc78dedfee48c/app.json') |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86349
2345