How to use the pipeline function from readable-stream
Find comprehensive JavaScript readable-stream.pipeline code examples handpicked from public code repositorys.
GitHub: tkestack/tke
22 23 24 25 26 27 28 29 30 31
const ejs = require('gulp-ejs'); const fg = require('fast-glob'); // 从public压缩复制文件到build function minifyJs() { return pipeline(src('public/**/*.js'), uglifyjs(), dest('build')); } function minifyCss() { return src('public/**/*.css').pipe(cleanCSS()).pipe(dest('build'));
319
0
51
77 78 79 80 81 82 83 84 85 86 87
// ignore any data after footerOffset and push footerBuffer // // this is necessary to ignore any blank space between the last block and the // final footer which would invalidate the size we computed const newStream = new EndCutterStream(footerOffset, footerBuffer) pipeline(stream, newStream, noop) newStream.length = footerOffset + FOOTER_SIZE return newStream }
206
571
0
GitHub: nodertc/datachannel
94 95 96 97 98 99 100 101 102
if (readableClosed && writableClosed && !this[_closed]) { this.close(); } }; pipeline(this[_input], handshake, err => { if (err) { this.emit('error', err); }
2
8
2
GitHub: michaelnisi/manger
151 152 153 154 155 156 157 158 159 160
debug('using snapshot: %s', snapshot); const ops = []; let count = 0; pipeline( db.createKeyStream(allRanks), new Transform({ objectMode: true, transform(chunk, _enc, transformCallback) {
0
5
1
+ 3 other calls in file
GitHub: Level/read-stream
36 37 38 39 40 41 42 43 44 45 46 47
}) test('EntryStream', function (t) { t.plan(2) pipeline(new EntryStream(db), new Concat((acc) => { t.same(acc, data) }), t.ifError.bind(t)) })
1
2
0
+ 2 other calls in file
readable-stream.call is the most popular function in readable-stream (1227 examples)