UNPKG

@js-data-tools/js-helpers

Version:

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

11 lines (10 loc) 245 B
export async function* mapAsync(source, transform) { for await (const item of source) { yield transform(item); } } export function* map(source, transform) { for (const item of source) { yield transform(item); } }