1.0.0 • Published 4 years ago

@gedalos.dev/callbag-interval v1.0.0

Weekly downloads
2
License
ISC
Repository
gitlab
Last release
4 years ago

callbag-interval

callbag listenable source, (emits a sequence of numbers 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-interval

example

import pipe from '@gedalos.dev/callbag-pipe';
import interval from '@gedalos.dev/callbag-interval';
import forEach from '@gedalos.dev/callbag-for-each';

pipe(
  interval(1000), //       0---1---2---3---4---5---6-->
  forEach(console.log) //  0---1---2---3---4---5---6-->
);
1.0.0

4 years ago