UNPKG

@js-data-tools/js-helpers

Version:

A set of JavaScript / TypeScript helper functions for parsing, converting, transforming and formatting data.

16 lines (15 loc) 397 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.map = exports.mapAsync = void 0; async function* mapAsync(source, transform) { for await (const item of source) { yield transform(item); } } exports.mapAsync = mapAsync; function* map(source, transform) { for (const item of source) { yield transform(item); } } exports.map = map;