Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

pull-tomany

1.0.0 • Public • Published

pull-tomany

Duplicate chunks in a pull stream to multiple sinks with back pressure and handling all errors and abort.

Basic example

use an array of streams to write into.

var pull = require('pull-stream')
var tomany = require('pull-tomany')
pull(
  pull.values([1,2,3,4,5]),
  //tomany is a sink, so it's the last thing in the pipeline.
  tomany([
    pull.collect(console.log), // => [1,2,3,4,5]
    pull.collect(console.log), // => [1,2,3,4,5]
    pull.collect(console.log)  // => [1,2,3,4,5]
  ])
)

License

MIT

Keywords

none

install

npm i pull-tomany

Downloadsweekly downloads

0

version

1.0.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability