# kefir

> Reactive Programming library for JavaScript inspired by Bacon.js and RxJS with focus on high performance and low memory usage

Latest version **3.8.8** (published 2020-11-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install kefir
pnpm add kefir
yarn add kefir
bun add kefir
```

## Health

**Score 28/100 (F)** — status: abandoned.

Positive: has types package; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.8.8 |
| Published | 2020-11-28 |
| First published | 2014-05-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/kefir) |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 426.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1885 |
| Author | Roman Pominov |
| Maintainers | pozadi, jamesdigioia, macil |
| Keywords | frp, bacon, bacon.js, kefir, kefir.js, functional, reactive, stream, streams, EventStream, Rx, RxJs, Observable |

## Links

- npm: https://www.npmjs.com/package/kefir
- Repository: https://github.com/kefirjs/kefir
- Issues: https://github.com/kefirjs/kefir/issues
- npm.io page: https://npm.io/package/kefir

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 3.8.8 (latest) — 2020-11-28
- 3.8.7 — 2020-05-16
- 3.8.6 — 2019-01-07
- 3.8.5 — 2018-09-14
- 3.8.3 — 2018-03-14
- 3.8.2 — 2018-03-05
- 3.8.1 — 2018-01-07
- 3.8.0 — 2017-10-26
- 3.7.4 — 2017-08-25
- 3.7.3 — 2017-07-17
- 3.7.2 — 2017-05-27
- 3.7.1 — 2017-01-21
- 3.7.0 — 2016-12-31
- 3.6.1 — 2016-11-29
- 3.6.0 — 2016-10-19
- … 71 more at https://npm.io/package/kefir/versions

## README

# <a href="http://kefirjs.github.io/kefir/"><img src="http://kefirjs.github.io/kefir/Kefir-with-bg.svg" width="60" height="60"></a> Kefir



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 Status](https://travis-ci.org/kefirjs/kefir.svg?branch=master)](https://travis-ci.org/kefirjs/kefir)
[![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
// @flow

import Kefir from 'kefir'

function foo(numberStream: Kefir.Observable<number>) {
  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<number> 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
```

---
_Source: https://npm.io/package/kefir · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
