UNPKG

515 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6
7exports.default = function (req, res, array) {
8 var functionIndex = 0;
9
10 var next = function next() {
11 for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
12 args[_key] = arguments[_key];
13 }
14
15 functionIndex++;
16
17 if (functionIndex === array.length) return null;
18 array[functionIndex].apply(array, args.concat([next]));
19 };
20
21 if (functionIndex === 0) array[0](req, res, next);
22};
\No newline at end of file