routington
Advanced tools
Comparing version 1.0.1 to 1.0.2
var assert = require('http-assert') | ||
var Routington = require('./routington') | ||
var createError = require('http-errors') | ||
@@ -32,3 +33,3 @@ /* | ||
frag = decode(frags.shift()) | ||
if (frag === -1) throw createError(404, 'malformed url: ' + url) | ||
assert(frag !== -1, 404, 'malformed url: ' + url) | ||
length = frags.length | ||
@@ -35,0 +36,0 @@ |
@@ -0,1 +1,4 @@ | ||
var assert = require('assert') | ||
var Routington = require('./routington') | ||
@@ -5,3 +8,3 @@ | ||
var options = Parse(string) | ||
if (!options) throw new Error('Invalid parsed string: ' + string) | ||
assert(options, 'Invalid parsed string: ' + string) | ||
return options | ||
@@ -8,0 +11,0 @@ } |
@@ -5,4 +5,3 @@ | ||
function Routington(options) { | ||
if (!(this instanceof Routington)) | ||
return new Routington(options) | ||
if (!(this instanceof Routington)) return new Routington(options) | ||
@@ -9,0 +8,0 @@ this._init(options) |
{ | ||
"name": "routington", | ||
"description": "Trie-based URL Routing", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"dependencies": { | ||
"http-errors": "~1.2.0", | ||
"flatten": "~0.0.1" | ||
"flatten": "~0.0.1", | ||
"http-assert": "^1.0.2" | ||
}, | ||
@@ -9,0 +9,0 @@ "devDependencies": { |
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
Network access
Supply chain riskThis module accesses the network.
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
12122
+ Addedhttp-assert@^1.0.2
+ Addeddeep-equal@1.0.1(transitive)
+ Addeddepd@1.1.2(transitive)
+ Addedhttp-assert@1.5.0(transitive)
+ Addedhttp-errors@1.8.1(transitive)
+ Addedsetprototypeof@1.2.0(transitive)
+ Addedtoidentifier@1.0.1(transitive)
- Removedhttp-errors@~1.2.0
- Removedhttp-errors@1.2.8(transitive)