by devit · 5y ago · 0 comments
This would require the scripts to no longer be vanilla JavaScript, but it seems easy to extend sucrase/babel to do that transpiling.
function pipe(...functions) {
(async () => {
let accum;
for (const fn of functions)
accum = await fn(accum);
}());
}