@dkx/http-middleware-condition
v0.0.1
Published
Condition middleware for @dkx/http-server
Downloads
2
Readme
DKX/Http/Middleware/Condition
Condition middleware for @dkx/http-server.
Installation
$ npm install --save @dkx/http-middleware-condition
or with yarn
$ yarn add @dkx/http-middleware-condition
Usage
const {Server} = require('@dkx/http-server');
const {conditionMiddleware} = require('@dkx/http-middleware-condition');
const app = new Server;
app.use(conditionMiddleware(async function(request, response, state) {
return true;
}));
If false
is returned, no further middleware will be called.