Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krawaller/callbag-map-to
https://github.com/krawaller/callbag-map-to
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/krawaller/callbag-map-to
- Owner: krawaller
- License: mit
- Created: 2018-02-14T13:28:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-23T07:47:50.000Z (over 6 years ago)
- Last Synced: 2024-09-19T00:46:13.715Z (about 2 months ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- awesome-callbags - map-to
README
# callbag-map-to
[Callbag](https://github.com/callbag/callbag) operator that transforms data passing to it to a fixed value.
`npm install callbag-map-to`
## example
```js
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'
```