Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kefirjs/kefir
A Reactive Programming library for JavaScript
https://github.com/kefirjs/kefir
frp functional-programming javascript kefir observable reactive stream
Last synced: 4 days ago
JSON representation
A Reactive Programming library for JavaScript
- Host: GitHub
- URL: https://github.com/kefirjs/kefir
- Owner: kefirjs
- License: mit
- Created: 2014-05-04T14:52:16.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-06-20T00:40:05.000Z (7 months ago)
- Last Synced: 2024-10-29T15:07:40.153Z (2 months ago)
- Topics: frp, functional-programming, javascript, kefir, observable, reactive, stream
- Language: JavaScript
- Homepage: https://kefirjs.github.io/kefir/
- Size: 9.1 MB
- Stars: 1,873
- Watchers: 57
- Forks: 97
- Open Issues: 39
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-nodejs-cn - Kefir.js - 专注于高性能和低内存消耗的响应式库 (包 / 函数式编程)
- awesome-nodejs - Kefir.js - Reactive library with focus on high performance and low memory usage. ![](https://img.shields.io/github/stars/kefirjs/kefir.svg?style=social&label=Star) (Repository / Functional programming)
- awesome-github-repos - kefirjs/kefir - A Reactive Programming library for JavaScript (JavaScript)
- awesome-nodejs - Kefir.js - Reactive library with focus on high performance and low memory usage. (Packages / Functional programming)
- awesome-node - Kefir.js - Reactive library with focus on high performance and low memory usage. (Packages / Functional programming)
- awesome-nodejs-cn - Kefir.js - 响应式库,专注于高性能和低内存使用. (目录 / 函数式编程)
- awesome-nodejs - kefir - A Reactive Programming library for JavaScript - ★ 1489 (Functional programming)
- awesome-nodejs-cn - Kefir.js - **star:1877** 响应式,专注于高性能和低内存使用 (包 / 函数式编程)
README
Kefir — is an Reactive Programming library for JavaScript
inspired by [Bacon.js](https://github.com/baconjs/bacon.js)
and [RxJS](https://github.com/Reactive-Extensions/RxJS)
with focus on high performance and low memory usage.For docs visit [kefirjs.github.io/kefir](http://kefirjs.github.io/kefir).
See also [Deprecated API docs](https://github.com/kefirjs/kefir/blob/master/deprecated-api-docs.md).[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/kefirjs/kefir/blob/master/LICENSE.txt)
[![npm version](https://img.shields.io/npm/v/kefir.svg?style=flat)](https://www.npmjs.com/package/kefir)
[![Build](https://github.com/kefirjs/kefir/actions/workflows/node.js.yml/badge.svg)](https://github.com/kefirjs/kefir/actions/workflows/node.js.yml)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pozadi/kefir?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)# Installation
Kefir available as NPM and Bower packages, as well as simple files download.
### NPM
```sh
npm install kefir
```### Bower
```sh
bower install kefir
```### Download
See [downloads](https://kefirjs.github.io/kefir/#downloads) section in the docs.
Also available on [jsDelivr](http://www.jsdelivr.com/#!kefir).
# Browsers support
We don't support IE8 and below, aside from that Kefir should work in any browser.
## [Flow](https://flowtype.org/)
The NPM package ships with Flow definitions. So you can do something like this if you use Flow:
```js
// @flowimport Kefir from 'kefir'
function foo(numberStream: Kefir.Observable) {
numberStream.onValue(x => {
// Flow knows x is a number here
})
}const s = Kefir.constant(5)
// Flow can automatically infer the type of values in the stream and determine
// that `s` is of type Kefir.Observable here.
foo(s)
```# Development
```sh
npm run prettify # makes source code pretty (you must run it before a PR could be merged)
npm run build-js # builds js bundlers
npm run test # runs all the checks
npm run test-only # runs only unit tests without other checks
npm run test-debug # runs tests with a chrome inspector connected to the node process
npm run build-docs # builds the documentation html file
```