All files / join index.js

100% Statements 6/6
100% Branches 0/0
100% Functions 4/4
100% Lines 3/3
1 2 3 4 5 6 7 8 9 10 112x     4x     12x        
const load = require('loadware');
 
// Pass an array of modern middleware and return a single modern middleware
module.exports = (...middles) => ctx => load(middles).reduce((prev, next) => {
 
  // Make sure that we pass the original context to the next promise
  return prev.then(next).then(fake => ctx);
 
// Get it going with the right context
}, Promise.resolve(ctx));