UNPKG
kaiju
Version:
latest (0.28.6)
0.28.6
0.28.5
0.28.4
0.28.3
0.28.2
0.28.1
0.28.0
0.27.4
0.27.3
0.27.2
0.27.1
0.27.0
0.26.3
0.26.2
0.26.1
0.26.0
0.25.0
0.24.2
0.24.1
0.24.0
0.23.3
0.23.2
0.23.1
0.23.0
0.22.5
0.22.4
0.22.3
0.22.2
0.22.0
0.21.0
0.20.0
0.19.0
0.18.1
0.18.0
0.17.1
0.17.0
0.16.1
0.16.0
0.15.0
0.14.0
0.13.5
0.13.4
0.13.3
0.13.2
0.13.1
0.13.0
0.12.0
0.11.0
0.10.2
0.10.1
0.10.0
0.9.1
0.9.0
Virtual dom, observables and stateful components
github.com/AlexGalays/kaiju/
AlexGalays/kaiju
kaiju
/
es
/
observable
/
filter.js
10 lines
(8 loc)
•
242 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
import
{
Observable
}
from
'./observable'
;
export
default
function
filter
(
predicate, source
) {
return
Observable
(
function
(
add
) {
return
source.
subscribe
(
function
(
val, name
) {
if
(
predicate
(val))
add
(val, name); }); }); }