@naturalcycles/nodejs-lib
Version:
Standard library for Node.js
12 lines • 485 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const __1 = require("../..");
const pipeline_1 = require("./pipeline");
/**
* Wrapper around stream.pipeline() that will run Mapper for each of the items, respecting backpressure.
*/
async function pipelineForEach(streams, mapper, opt) {
await pipeline_1._pipeline([...streams, __1.writableForEach(mapper, opt)]);
}
exports.pipelineForEach = pipelineForEach;
//# sourceMappingURL=pipelineForEach.js.map