tree: 9b13fffb024bac7ec73718474eca42d2b0a3713d [path history] [tgz]
  1. test/
  2. .travis.yml
  3. index.js
  4. LICENSE
  5. package.json
  6. README.md
node_modules/simple-concat/README.md

simple-concat travis npm downloads

Super-minimalist version of concat-stream. Less than 15 lines!

install

npm install simple-concat

usage

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)

license

MIT. Copyright (c) Feross Aboukhadijeh.