koa-pass
Conditionally skip a middleware when a condition is met.
NB: koa-pass@1 for koa@1.
Install
$ npm i koa-pass --save
Usage
middlewarepass = middleware
- opts: {Object|Array}
- method: {String|Array} http method, required.
- path: {String} path for path-to-regexp, required.
- pass: {Boolean|Function} if return true then pass, optional, default
true
.
- _pathToRegexpOpts: {Object} see path-to-regexp.
Examples
const Koa = const res = respass = const app = appappapp
or:
const Koa = const res = respass = const app = appappapp
Test
$ npm test
License
MIT