dok/node_modules/simple-concat
2026-03-11 14:15:42 +00:00
..
test Start mit DOK 2026-03-11 14:15:42 +00:00
.travis.yml Start mit DOK 2026-03-11 14:15:42 +00:00
index.js Start mit DOK 2026-03-11 14:15:42 +00:00
LICENSE Start mit DOK 2026-03-11 14:15:42 +00:00
package.json Start mit DOK 2026-03-11 14:15:42 +00:00
README.md Start mit DOK 2026-03-11 14:15:42 +00:00

simple-concat travis npm downloads javascript style guide

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.