JSPM

simple-concat

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11240901
  • Score
    100M100P100Q215457F
  • License MIT

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

Package Exports

  • simple-concat

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (simple-concat) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.