Appearance
异步映射数组元素。
import { mapAsync } from '@base-web-kits/base-tools-ts'; const array = [1, 2, 3]; const result = await mapAsync(array, async (n) => n * 2); // 结果: [2, 4, 6]
collection (Array)
iteratee (Function)
(Promise<Array>)