edygar / callbag-map

Callbag operator that applies a transformation on data passing through it

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

callbag-map

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

npm install callbag-map

example

const fromIter = require('callbag-from-iter');
const iterate = require('callbag-iterate');
const map = require('callbag-map');

const source = map(x => x * 0.1)(fromIter([10,20,30,40]));

iterate(x => console.log(x))(source); // 1
                                      // 2
                                      // 3
                                      // 4

About

Callbag operator that applies a transformation on data passing through it

License:MIT License


Languages

Language:JavaScript 100.0%