Skip to content

Instantly share code, notes, and snippets.

View qathom's full-sized avatar
🦉
Focusing

Anthony Meizoso qathom

🦉
Focusing
View GitHub Profile
@qathom
qathom / stacks-series.js
Last active August 15, 2019 13:57
Run array stacks in series (create stacks from an array and run them in series) - Async function is supported
const { forEachSeries } = require('p-iteration');
// Async function
function asyncFn(item, time = 1000) {
return new Promise((resolve) => {
setTimeout(() => {
console.log(item);
resolve(item);
}, time);
});