package
Super-minimalist version of `concat-stream`. Less than 15 lines!
npm install simple-concatGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 1 packages.
4.5 kB
Includes dependencies.
concat-stream. Less than 15 lines!npm install simple-concatThis example is longer than the implementation.
var s = new stream.PassThrough()
concat(s, function (err, buf) {
if (err) throw err
console.error(buf)
})
s.write('abc')
setTimeout(function () {
s.write('123')
}, 10)
setTimeout(function () {
s.write('456')
}, 20)
setTimeout(function () {
s.end('789')
}, MIT. Copyright (c) Feross Aboukhadijeh.