4 const chainFuncsAsync = (result, func) => result.then(func);
5 const chainFuncsSync = (result, func) => func(result);
8 * Runs the given functions sequentially. If the `init` param is a promise,
9 * functions are chained using `p.then()`. Otherwise, functions are chained by passing
10 * the result of each function to the next.
12 module.exports = function funcRunner(
16 const isAsync = init instanceof Promise;
19 isAsync === true ? chainFuncsAsync : chainFuncsSync,