UNPKG
pull-stream-util
Version:
latest (0.1.2)
0.1.2
0.1.1
0.1.0
0.0.7
0.0.6
0.0.5
0.0.4
0.0.3
0.0.2
0.0.1
0.0.0
Helpers for working with pull streams
github.com/nichoth/pull-stream-util
nichoth/pull-stream-util
pull-stream-util
/
by-key.js
12 lines
(8 loc)
•
242 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
var
S =
require
(
'pull-stream/pull'
)
function
StreamByKey
(
sources, sinks
) {
return
Object
.
keys
(sources).
reduce
(
function
(
acc, k
) { acc[k] =
S
( sources[k], sinks[k] )
return
acc }, {}) }
module
.
exports
=
StreamByKey