UNPKG

light-ning

Version:

(ALPHA) framework without dependecies...

22 lines (16 loc) 515 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = function (req, res, array) { var functionIndex = 0; var next = function next() { for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } functionIndex++; if (functionIndex === array.length) return null; array[functionIndex].apply(array, args.concat([next])); }; if (functionIndex === 0) array[0](req, res, next); };