1.0.6 • Published 4 years ago
@gedalos.dev/callbag-random-interval v1.0.6
callbag-random-interval
callbag listenable source, (emits a sequence of numbers randomly over time).
original idea by André Staltz - callbag
run test
$ yarn
$ yarn -s test
the status code ($?
) will be 0 or 1 depending on the result.
install
$ yarn add @gedalos.dev/callbag-random-interval
example
import pipe from "@gedalos.dev/callbag-pipe";
import randomInterval from "@gedalos.dev/callbag-random-interval";
import forEach from "@gedalos.dev/callbag-for-each";
pipe(
randomInterval(500)(1000), // --1-2---3--4-5---6------7>
forEach(console.log) // --1-2---3--4-5---6------7>
);