series-middleware

Wrapper to execute multiple express like middleware in series minimising leaks

use middleware-flow series instead
Last updated 5 years ago by confuser .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install series-middleware 
SYNC missed versions from official npm registry.

series-middleware

Build Status Coverage Status

Execute middleware in series. Useful for frameworks/systems that will only accept a singular function (req, res, next). Written in a way to minimise leaks.

Installation

npm install series-middleware --save

Usage


var app = require('express')()
  , seriesMiddleware = require('series-middleware')

// Express supports this natively obviously, but configuration based frameworks such as a127-magic, do not
app.get('/test', seriesMiddleware(noOpMiddleware, noOpMiddleware), function (req, res) {
  res.send('I am OK')
})

app.get('/test2', seriesMiddleware(function (req, res) {
  res.send('I am OK')
}, noOpMiddleware), function (req, res) {
  res.send('Never Executed')
})

Current Tags

  • 1.0.0                                ...           latest (5 years ago)

1 Versions

  • 1.0.0 [deprecated]           ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (10)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |