1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
Oinktube/node_modules/simple-concat
2023-02-17 15:04:26 -03:00
..
test Updates node modules 2023-02-17 15:04:26 -03:00
.travis.yml Updates node modules 2023-02-17 15:04:26 -03:00
index.js Updates node modules 2023-02-17 15:04:26 -03:00
LICENSE Updates node modules 2023-02-17 15:04:26 -03:00
package.json Updates node modules 2023-02-17 15:04:26 -03:00
README.md Updates node modules 2023-02-17 15:04:26 -03: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.