mware
mware
is a utility for creating a middleware stack with any node or browser application. Inspired by the middleware pattern in connect.
Usage
;const use run = ; // add middleware; // run stackconst context = {};;
Installation
NPM
npm install --save mware
Yarn
yarn add mware
API
mware()
Returns a mware
instance.
Instance
#use(fn...)
fn: Function|[]Function
, Middleware functions to add to stack.
#run([args], [done])
args: []*
, List of arguments to pass to each middleware function.done: Function
, Callback for when the middleware stack has stopped.
License
Copyright (c) 2016 Christopher Turner