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