Compose an array of middleware into a single function for use in Express, Connect, router, etc.
npm install compose-middleware --save
Mostly useful for third-party tooling that needs to generate a middleware function without the overhead of an array. You should probably just use an array.
import express = require('express')
import { compose } from 'compose-middleware'
const app = express()
app.use(compose([
function (req, res, next) {},
function (req, res, next) {},
function (req, res, next) {}
]))
MIT