Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pfrazee/pull-tomany
duplicate a pull-stream to many sinks
https://github.com/pfrazee/pull-tomany
Last synced: 14 days ago
JSON representation
duplicate a pull-stream to many sinks
- Host: GitHub
- URL: https://github.com/pfrazee/pull-tomany
- Owner: pfrazee
- Created: 2014-12-20T19:53:57.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-20T21:32:40.000Z (about 10 years ago)
- Last Synced: 2024-10-30T15:54:37.803Z (2 months ago)
- Language: JavaScript
- Size: 117 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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.
``` js
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