UNPKG

aztec

Version:

Node Js Framework for creating API Services

14 lines (13 loc) 392 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.middleware = (req, res, array) => { let functionIndex = 0; const next = (...args) => { functionIndex++; if (functionIndex === array.length) return null; array[functionIndex](...args, next); }; if (functionIndex === 0) array[0](req, res, next); };