1.0.2 • Published 4 years ago

@gedalos.dev/callbag-filter v1.0.2

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

callbag-filter

Filter the source data.

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-filter

using from nodejs

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

pipe(
  of(1, 2, 3, 5, 8, 13, 21),
  filter((data) => data % 2),
  forEach(console.log) // 1, 3, 5, 13, 21
);

using from browser

import pipe from 'callbag-pipe/index.js';
import of from 'callbag-of/index.js';
import filter from 'callbag-filter/index.js';
import forEach from 'callbag-for-each/index.js';

pipe(
  of(1, 2, 3, 5, 8, 13, 21),
  filter((data) => data % 2),
  forEach(console.log) // 1, 3, 5, 13, 21
);
1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

5 years ago