UNPKG

axax

Version:

A library of async iterator extensions for JavaScript including ```map```, ```reduce```, ```filter```, ```flatMap```, ```pipe``` and [more](https://github.com/jamiemccrindle/axax/blob/master/docs/API.md#functions).

14 lines (13 loc) 307 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Flattens an iterable of iterables */ async function* flatten(source) { for await (const child of source) { for await (const item of child) { yield item; } } } exports.flatten = flatten;