0.3.1 a new combination is also ready type observer (combination of combination). Set that.
parent
7730a94d3d
commit
3e3e46ee24
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@uci-utils/ready",
|
||||
"version": "0.3.0",
|
||||
"version": "0.3.1",
|
||||
"description": "A Class to Observe the reduced to boolean combined state of a map of observables",
|
||||
"main": "src/ready.js",
|
||||
"scripts": {
|
||||
|
|
|
@ -137,7 +137,7 @@ class Ready extends Map {
|
|||
|
||||
// TODO have combineObservers call this
|
||||
makeCombination(observers,list){
|
||||
observers = observers.filter(obs=>obs._readyType)
|
||||
observers = observers.filter(obs=>(obs || {})._readyType)
|
||||
if (!observers.length) return false
|
||||
let combination = combineLatest(observers).pipe(
|
||||
tap(states => { if (list) this.log(list.map((name,index) => [name,states[index]]))}),
|
||||
|
@ -145,6 +145,7 @@ class Ready extends Map {
|
|||
changed(), //filters out emission if it is unchanged from last TODO replace with distinctUntilChanged
|
||||
shareReplay(1)
|
||||
)
|
||||
combination._readyType = true
|
||||
return combination
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue