UNPKG

iterama

Version:

Composable functional (async) iterable helpers

16 lines (12 loc) 296 B
Object.defineProperty(exports, "__esModule", { value: true }); exports.toMapAsync = void 0; const toMapAsync = async iterable => { const result = new Map(); for await (const [key, value] of iterable) { result.set(key, value); } return result; }; exports.toMapAsync = toMapAsync;