1.1.0 • Published 6 years ago

callbag-sample-combine v1.1.0

Weekly downloads
7
License
MIT
Repository
github
Last release
6 years ago

callbag-sample-combine

Callbag operator behaving exactly like callbag-sample by André Staltz except the return source emits both the original listenable and the sampled pullable values together.

npm install callbag-sample-combine

example

const sampleCombine = require('callbag-sample-combine');
const fromIter = require('callbag-from-iter');
const fromInterval = require('callbag-interval');
const forEach = require('callbag-for-each');

const listenable = fromInterval(1000);
const pullable = fromIter(['foo', 'bar', 'baz']);

const source = sampleCombine(pullable)(listenable);
const sink = forEach(d => console.log(d));

source(0, sink);   // [1, 'foo']
                   // [2, 'bar']
                   // [3, 'baz']
1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago