uritemplate
Advanced tools
Comparing version 0.1.2 to 0.1.3
@@ -26,3 +26,3 @@ { | ||
], | ||
"version" : "0.1.2" | ||
"version" : "0.1.3" | ||
} |
@@ -29,2 +29,9 @@ URI Template JS | ||
If you want to clone the git project, be aware of the submodule uritemplate-test. | ||
So you have to to: | ||
git https://github.com/fxa/uritemplate-js.git | ||
git submodule init | ||
git submodule update | ||
Tests | ||
@@ -31,0 +38,0 @@ ----- |
@@ -35,2 +35,12 @@ | ||
} | ||
function arrayAll(array, predicate) { | ||
var index; | ||
for (index = 0; index < array.length; index += 1) { | ||
if (!predicate(array[index], index, array)) { | ||
return false; | ||
} | ||
} | ||
return true; | ||
} | ||
@@ -477,6 +487,6 @@ function reduce(arrayOrObject, callback, initialValue) { | ||
} | ||
// TODO check for allowed chars. This if-statement is just to pass the uritemplate-test | ||
if (chr === ':' && uriTemplateText.substring(literalStart, index).indexOf('/') >= 0) { | ||
throw new Error('":" not allowed after a "/" in a regular uri'); | ||
} | ||
// TODO if (chr === ';') | ||
// In a regular URI a colon is only allowed as separator after a uri scheme (e.g. 'http:') and between host and port | ||
// (e.g. 'example.com:443'). So the only slash allowed in front of a colon is the '//' after the scheme separator | ||
// throw new Error('":" not allowed after a "/" in a regular uri'); | ||
continue; | ||
@@ -483,0 +493,0 @@ } |
@@ -84,4 +84,6 @@ | ||
runTestFile('uritemplate-test/negative-tests.json'); | ||
runTestFile('own-testcases.json'); | ||
console.log('passed all ' + numTestsPassed + ' tests!'); | ||
}()); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
40724
904
55
1