This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let Middleware = function() { }; | |
// executes the middlewares supplying initial args to the first middleware | |
// this function returns a Promise which gets resolved after the last middleware is executed | |
Middleware.prototype.exec = function() { | |
let args = Array.prototype.slice.call(arguments); | |
let that = this | |
return new Promise(function(resolve /*,reject */){ | |
let pr = this; | |
let end = function(){ |