callbag-ap

1.1.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i callbag-ap

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

7.65 kB

Total Files

5

Last publish

Collaborators

  • shatteredaesthetic