sensordb2 e64a8defe5 3.17 | il y a 1 an | |
---|---|---|
.. | ||
test | il y a 1 an | |
.travis.yml | il y a 1 an | |
LICENSE | il y a 1 an | |
README.md | il y a 1 an | |
index.js | il y a 1 an | |
package.json | il y a 1 an |
concat-stream
. Less than 15 lines!npm install simple-concat
This 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')
}, 30)
MIT. Copyright (c) Feross Aboukhadijeh.