1.1.0 • Published 6 years ago

callbag-ap v1.1.0

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

callbag-ap

Callbag operator that applies data to a transformation passing through it. Works on either pullable or listenable sources.

npm install callbag-ap

example

const fromIter = require('callbag-from-iter');
const forEach = require('callbag-foreach');
const ap = require('callbag-ap');

const iter = fromIter([
  x => x + 1,
  x => x * 2,
  x => `${x} bits`
  x => x === 2
]);

const source = ap(2)(fromIter([]));

forEach(x => console.log(x))(source); // 3
                                      // 4
                                      // 2 bits
                                      // true
1.1.0

6 years ago

1.0.0

6 years ago