UNPKG

@newdash/newdash

Version:

javascript/typescript utility library

14 lines (13 loc) 448 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.map = void 0; const map_1 = require("../map"); async function map(collection, iteratee) { if (iteratee === undefined) { return (0, map_1.map)(collection); } const results = await Promise.all((0, map_1.map)(collection, iteratee)); return (0, map_1.map)(results, (result) => result ?? undefined); } exports.map = map; exports.default = map;