Foundation Async
Foundation Async is modern async utility library written in Typescript delivering modularity, performance, and extras.
Installation
Using yarn:
$ yarn add foundation-async
Using npm:
$ npm i foundation-async
Example
import { asyncMap } from "foundation-async";
const array = [1, 2];
const asyncFunc = (n) => {
return new Promise((resolve) => {
resolve(String(n));
});
}
const result = await asyncMap(array, asyncFunc);
// result = ["1", "2"];