1.0.2 • Published 5 years ago
@gedalos.dev/callbag-for-each v1.0.2
callbag-for-each
Callbag sink, (listenable and pullable sources).
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-for-each
using from nodejs
import pipe from '@gedalos.dev/callbag-pipe';
import of from '@gedalos.dev/callbag-of';
import forEach from '@gedalos.dev/callbag-for-each';
pipe(
of(1, 2, 3, 5, 8, 13, 21),
forEach(console.log) // 1, 2, 3, 5, 8, 13, 21
);
using from browser
import pipe from 'callbag-pipe/index.js';
import of from 'callbag-of/index.js';
import forEach from 'callbag-for-each/index.js';
pipe(
of(1, 2, 3, 5, 8, 13, 21),
forEach(console.log) // 1, 2, 3, 5, 8, 13, 21
);