github-url-from-username-repo
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -14,3 +14,3 @@ module.exports = getUrl | ||
// GH usernames cannot start with . or - | ||
if (/^[^@%\/\s\.-][^@%\/\s]*\/[^@\s\/%]+(?:#.*)?$/.test(r)) { | ||
if (/^[^@%\/\s\.-][^:@%\/\s]*\/[^@\s\/%]+(?:#.*)?$/.test(r)) { | ||
if (forBrowser) | ||
@@ -17,0 +17,0 @@ r = r.replace("#", "/tree/") |
{ | ||
"name": "github-url-from-username-repo", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Create urls from username/repo", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -20,2 +20,7 @@ var assert = require("assert") | ||
it("returns null for something that's already a URI", function () { | ||
var url = getUrl("file:../relative") | ||
assert.deepEqual(null, url) | ||
}) | ||
it("works with .", function () { | ||
@@ -43,3 +48,3 @@ var url = getUrl("component/.download.er.js.") | ||
}) | ||
it("can handle branches with slashes", function () { | ||
@@ -46,0 +51,0 @@ var url = getUrl( |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
5715
75
1