How to use the finished function from readable-stream
Find comprehensive JavaScript readable-stream.finished code examples handpicked from public code repositorys.
GitHub: Level/many-level
105 106 107 108 109 110 111 112 113 114
self[kFlushed]() }) const proxy = Duplex.from({ writable: decode, readable: encode }) finished(proxy, cleanup) this[kRpcStream] = proxy return proxy function cleanup () {
2
15
8
GitHub: nodertc/datachannel
103 104 105 106 107 108 109 110 111
readableClosed = true; maybeClose(); }); finished(this[_output], err => { if (err) { this.emit('error', err); }
2
8
2
37 38 39 40 41 42 43 44 45 46
const carml = carmlCli({ mappingFile, onError: err => stream.destroy(err) }) const parser = new N3Parser({ factory: rdf }) const quadStream = parser.import(carml.stdout) const stream = duplexify.obj(carml.stdin, quadStream) finished(quadStream, () => { onFinished.forEach(callback => callback()) }) return stream
0
0
7
readable-stream.call is the most popular function in readable-stream (1227 examples)