lia-stack
v1.0.7
Published
JavaScript/TypeScript library of Execute multiple asynchronous tasks and return synchronous results
Downloads
6
Readme
LIA STACK
JavaScript/TypeScript library of Execute multiple asynchronous tasks and return synchronous results
install
npm install lia-stack
use
import Stack from "lia-stack";
const start = async () => {
let items = [{name: 'task1'},{name: 'task2'}];
const result = await new Stack<{ name: string }>(
(item, _index:number, resolve, reject) => {
// do someting
//resolve(result)
//reject(error)
}
).tasks(items).timeout(1000).exec();
}
start()