find-my-way
Advanced tools
Comparing version 1.15.0 to 1.15.1
{ | ||
"name": "find-my-way", | ||
"version": "1.15.0", | ||
"version": "1.15.1", | ||
"description": "Crazy fast http radix based router", | ||
@@ -39,4 +39,4 @@ "main": "index.js", | ||
"safe-regex": "^1.1.0", | ||
"semver-store": "^0.2.0" | ||
"semver-store": "^0.3.0" | ||
} | ||
} |
@@ -121,3 +121,3 @@ # find-my-way | ||
// The 'Accept-Version' header could be '1.2.0' as well as '2.x' or '2.4.x' | ||
// The 'Accept-Version' header could be '1.2.0' as well as '*', '2.x' or '2.4.x' | ||
``` | ||
@@ -124,0 +124,0 @@ If you declare multiple versions with the same *major* or *minor* `find-my-way` will always choose the highest compatible with the `Accept-Version` header value. |
@@ -81,2 +81,13 @@ 'use strict' | ||
test('A route could support multiple versions (find) / 5', t => { | ||
t.plan(1) | ||
const findMyWay = FindMyWay() | ||
findMyWay.on('GET', '/', { version: '1.2.3' }, () => false) | ||
findMyWay.on('GET', '/', { version: '3.2.0' }, () => true) | ||
t.ok(findMyWay.find('GET', '/', '*').handler()) | ||
}) | ||
test('Find with a version but without versioned routes', t => { | ||
@@ -83,0 +94,0 @@ t.plan(1) |
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
129397
3683
+ Addedsemver-store@0.3.0(transitive)
- Removedsemver-store@0.2.2(transitive)
Updatedsemver-store@^0.3.0