Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shatteredaesthetic/callbag-ap
callbag operator that applies data to a transformation passing through it
https://github.com/shatteredaesthetic/callbag-ap
Last synced: 18 days ago
JSON representation
callbag operator that applies data to a transformation passing through it
- Host: GitHub
- URL: https://github.com/shatteredaesthetic/callbag-ap
- Owner: shatteredaesthetic
- License: mit
- Created: 2018-02-08T00:43:38.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-17T23:02:55.000Z (over 6 years ago)
- Last Synced: 2024-07-31T21:53:23.156Z (3 months ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- awesome-callbags - ap
README
# 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
```js
const fromIter = require('callbag-from-iter');
const forEach = require('callbag-for-each');
const ap = require('callbag-ap');const iter = fromIter([
x => x + 1,
x => x * 2,
x => `${x} bits`
x => x === 2
]);const source = ap(2)(iter);
forEach(x => console.log(x))(source); // 3
// 4
// 2 bits
// true
```