routington
Advanced tools
Comparing version 0.1.1 to 0.1.2
@@ -29,3 +29,4 @@ var Routington = require('./routington') | ||
while (length) { | ||
frag = frags.shift() | ||
frag = decode(frags.shift()) | ||
if (frag === -1) malformed() | ||
length = frags.length | ||
@@ -69,2 +70,16 @@ | ||
} | ||
} | ||
function decode(string) { | ||
try { | ||
return decodeURIComponent(string) | ||
} catch (err) { | ||
return -1 | ||
} | ||
} | ||
function malformed() { | ||
var err = new Error('malformed url') | ||
err.status = 400 | ||
throw err | ||
} |
{ | ||
"name": "routington", | ||
"description": "Trie-based URL Routing", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"devDependencies": { | ||
@@ -6,0 +6,0 @@ "mocha": "*", |
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
13443
12
274