callbag-map-to

Callbag operator that changes data passing through it to a fixed value


Keywords
callbag
License
MIT
Install
npm install callbag-map-to@1.1.0

Documentation

callbag-map-to

Callbag operator that transforms data passing to it to a fixed value.

npm install callbag-map-to

example

const fromIter = require('callbag-from-iter');
const forEach = require('callbag-for-each');
const mapTo = require('callbag-map-to');

const source = mapTo('foo')(fromIter([1,2,3]));

forEach(x => console.log(x))(source); // 'foo'
                                      // 'foo'
                                      // 'foo'