1.0.0 • Published 5 years ago

koa-unmatch v1.0.0

Weekly downloads
23
License
MIT
Repository
github
Last release
5 years ago

koa-unmatch

Run other koa middleware given that the path DOES NOT match

Passing in either a single or array of strings, plus a middleware, this middleware will run the given middleware when the requested path does not match any of the given paths

Installation

This module is distributed via npm:

npm install --save koa-unmatch

or

yarn add koa-unmatch

Usage

const Koa = require('koa');
const unmatch = require('koa-unmatch');

const app = new Koa();
app.use(unmatch('/path', (ctx, next) => {
  // do something here
}))