Files
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

30 lines
358 B
JavaScript

module.exports = function(funcs)
{
return new Promise((resolve, reject) =>
{
let i = 0;
const len = funcs.length;
function next()
{
if (i >= len)
return resolve();
const func = funcs[i];
func()
.then(() =>
{
i++;
next();
})
.catch((error) =>
{
return reject(error);
});
}
next();
});
};