one-validation
Advanced tools
Comparing version 2.1.0 to 2.2.0
@@ -14,3 +14,3 @@ { | ||
"description": "Regexp based validation collection for common internet validation tasks", | ||
"version": "2.1.0", | ||
"version": "2.2.0", | ||
"repository": { | ||
@@ -17,0 +17,0 @@ "url": "git://github.com/One-com/one-validation.git" |
@@ -102,2 +102,18 @@ /*global beforeEach, describe, it*/ | ||
}); | ||
describe('#rootRelativeUrl', function () { | ||
beforeEach(function () { | ||
regExp = oneValidation.rootRelativeUrl; | ||
}); | ||
it('should accept valid input', function () { | ||
expect('/', 'to pass'); | ||
expect('/foo.bar', 'to pass'); | ||
expect('/foo.bar/baz.quux?foo=bar&quux=zoo#pronk', 'to pass'); | ||
}); | ||
it('should reject invalid input', function () { | ||
expect('', 'not to pass'); | ||
}); | ||
}); | ||
}); |
@@ -87,2 +87,5 @@ /*global module, define*/ | ||
// Root-relative URL. Same as pathnameSearchHash, except it can't be empty | ||
fragments.rootRelativeUrl = new RegExp(fragments.pathnameSearchHash.source.replace(/\?$/, '')); | ||
function createHttpishUrlRegExp(options) { | ||
@@ -89,0 +92,0 @@ // [protocol"://"[username[":"password]"@"]hostname[":"port]"/"?][path]["?"querystring]["#"fragment] |
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
28524
337
0