Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 503 Bytes

File metadata and controls

19 lines (13 loc) · 503 Bytes

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'