4.5.1 • Published 6 years ago

kefir.combines v4.5.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

npm version Bower version Build Status Code Coverage npm.io npm.io

WARNING: This library has been superseded by the Karet Lift library.

The default export of this library

import K from "kefir.combines"

is a special purpose Kefir observable combinator designed for combining properties for a sink that accepts both observables and constant values such as VDOM extended to accept observables.

Unlike typical observable combinators, when K is invoked with only constants (no observables), then the result is computed immediately and returned as a plain value. This optimization eliminates redundant observables.

The basic semantics of K can be described as

K(x1, ..., xN, fn) === combine([x1, ..., xN], fn).skipDuplicates(identical)

where combine and skipDuplicates come from Kefir and identical from Ramda. Duplicates are skipped, because that can reduce unnecessary updates. Ramda's identical provides a semantics of equality that works well within the context of embedding properties to VDOM.

Unlike with combine, any argument of K is allowed to be

  • a constant,
  • an observable (including the combiner function), or
  • an array or object containing observables.

In other words, K also provides functionality similar to combineTemplate.

Note: K is carefully optimized for spaceif you write equivalent combinations using Kefir's own operators, they will likely take more memory.

4.5.1

6 years ago

4.5.0

6 years ago

4.4.0

6 years ago

4.4.0-0

6 years ago

4.3.0

6 years ago

4.2.0

6 years ago

4.1.5

7 years ago

4.1.4

7 years ago

4.1.3

7 years ago

4.1.2

7 years ago

4.1.1

7 years ago

4.1.0

7 years ago

4.0.0

7 years ago

3.0.5

7 years ago

3.0.4

7 years ago

3.0.3

7 years ago

3.0.2

7 years ago

3.0.1

7 years ago

3.0.0

7 years ago

2.0.0

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago