koa-trie-router
Advanced tools
Comparing version 1.0.7 to 1.0.8
var compose = require('koa-compose') | ||
var isGenFun = require('is-gen-fn') | ||
var flatten = require('flatten') | ||
var assert = require('assert') | ||
var METHODS = require('methods').map(function (method) { | ||
@@ -65,3 +67,3 @@ return method.toUpperCase() | ||
// Take out all the falsey middleware | ||
var stack = flatten(generators).filter(Boolean) | ||
var stack = flatten(generators).filter(Boolean).filter(assertGenFun) | ||
if (!stack.length) return | ||
@@ -104,1 +106,6 @@ | ||
Route.prototype.del = Route.prototype.delete | ||
function assertGenFun(fn) { | ||
assert(isGenFun(fn), 'all middleware must be generator functions') | ||
return fn | ||
} |
{ | ||
"name": "koa-trie-router", | ||
"description": "Trie-routing for Koa", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"author": { | ||
@@ -16,2 +16,3 @@ "name": "Jonathan Ong", | ||
"flatten": "0", | ||
"is-gen-fn": "0", | ||
"routington": "1", | ||
@@ -18,0 +19,0 @@ "koa-compose": "2" |
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
8821
148
5
+ Addedis-gen-fn@0
+ Addedis-gen-fn@0.0.2(transitive)