Skip to content

krawaller/callbag-sample-combine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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']

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published