Get started with kefir CDN
MIT licensed
Kefir: library for handling asynchronous data streams, reactively.
Tags:- frp
- bacon
- bacon.js
- kefir
- kefir.js
- functional
- reactive
- stream
- streams
- EventStream
- Rx
- RxJs
- Observable
Stable version
Copied!
How to start using kefir CDN
// Include the Kefir library
const Kefir = require('kefir')(window, 'Kefir'); // Assuming you're using a browser
// Create a Kefir stream
const sourceStream = Kefir.fromEvent(document, 'click');
// Map the click event to a string message
const clickToMessageStream = sourceStream.map(event => 'Click event detected');
// Filter the message stream to only include messages that contain the word 'click'
const clickMessageStream = clickToMessageStream.filter(msg => msg.includes('click'));
// Combine the filtered stream with another stream (for example, a timer)
const combinedStream = Kefir.merge(clickMessageStream, Kefir.interval(1000).mapTo('Timer tick'));
// Subscribe to the combined stream and log the messages to the console
combinedStream.subscribe(msg => console.log(msg));
Copied!
Copied!
All versions
0.1.10
0.1.11
0.1.12
0.1.4
0.1.5
0.1.6
0.1.7
0.1.8
0.1.9
0.2.0
0.2.1
0.2.10
0.2.11
0.2.2
0.2.3
0.2.4
0.2.5
0.2.6
0.2.7
0.2.8
0.2.9
0.3.0
0.4.0
0.4.1
0.4.2
0.5.0
0.5.1
0.5.2
0.5.3
1.0.0
1.1.0
1.2.0
1.3.0
1.3.1
1.3.2
2.0.0
2.0.0-rc.0
2.0.1
2.0.2
2.1.0
2.2.0
2.2.1
2.3.0
2.4.0
2.4.1
2.5.0
2.6.0
2.7.0
2.7.1
2.7.2
2.8.0
2.8.1
2.8.2
3.0.0
3.0.0-rc.0
3.1.0
3.2.0
3.2.1
3.2.2
3.2.3
3.2.4
3.2.5
3.2.6
3.3.0
3.4.0
3.5.0
3.5.1
3.5.2
3.6.0
3.6.1
3.7.0
3.7.1
3.7.2
3.7.3
3.7.4
*** 3.8.0