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).

17 lines (16 loc) 388 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Inserts values at the start of the iterable */ function insert(...values) { return async function* inner(source) { for (const value of values) { yield value; } for await (const item of source) { yield item; } }; } exports.insert = insert;