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

15 lines (14 loc) 297 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); /** * Tap an iterable */ function tap(func) { return async function* inner(source) { for await (const item of source) { func(item); yield item; } }; } exports.tap = tap;