UNPKG

@naturalcycles/nodejs-lib

Version:
19 lines 596 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const stream_1 = require("stream"); /** * Use as a "null-terminator" of stream.pipeline. * It consumes the stream as quickly as possible without doing anything. * Put it in the end of your pipeline in case it ends with Transform that needs a consumer. */ function writableVoid(opt) { return new stream_1.Writable({ objectMode: true, ...opt, write(chunk, _encoding, cb) { cb(); }, }); } exports.writableVoid = writableVoid; //# sourceMappingURL=writableVoid.js.map