dotfiles/vscode/.vscode/extensions/randomfractalsinc.vscode-data-preview-2.3.0/node_modules/simple-concat
Errol Sancaktar ff17c17e23 vscode
2024-06-14 09:31:58 -06:00
..
test vscode 2024-06-14 09:31:58 -06:00
.travis.yml vscode 2024-06-14 09:31:58 -06:00
index.js vscode 2024-06-14 09:31:58 -06:00
LICENSE vscode 2024-06-14 09:31:58 -06:00
package.json vscode 2024-06-14 09:31:58 -06:00
README.md vscode 2024-06-14 09:31:58 -06: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.