@dkx/http-middleware-condition
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @dkx/http-middleware-condition

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

4.5 kB

Total Files

9

Last publish

Collaborators

  • davidkcz