javascript - Combining streams with baconjs -


i have asynchronous events need combining. constructing array of n streams; each stream has onvalue function process returned data.

i have tried combining of streams 1 onvalues on top of onvalue, not called properly.

var streams = []  ... stream = bacon.fromcallback ....  stream.onvalue...( )  streams.push(stream)  ... bacon.onvalues(streams, f() { .... } ) 

what right way have function called when each stream has (unique) value... , when completed?

i assume job:

bacon.combineasarray(streams).onend(f) 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -