notifySubscribers and equalityComparer are not used outside KnockoutJS

This commit is contained in:
djmaze 2021-12-31 17:10:40 +01:00
parent 679d7356e0
commit 30e9b89d9b
9 changed files with 113 additions and 114 deletions

View file

@ -42,13 +42,13 @@ var observableFn = {
let value = this[observableLatestValue];
return value && value.toJSON ? value.toJSON() : value;
},
'equalityComparer': valuesArePrimitiveAndEqual,
equalityComparer: valuesArePrimitiveAndEqual,
peek: function() { return this[observableLatestValue]; },
valueHasMutated: function () {
this['notifySubscribers'](this[observableLatestValue], 'spectate');
this['notifySubscribers'](this[observableLatestValue]);
this.notifySubscribers(this[observableLatestValue], 'spectate');
this.notifySubscribers(this[observableLatestValue]);
},
valueWillMutate: function () { this['notifySubscribers'](this[observableLatestValue], 'beforeChange'); }
valueWillMutate: function () { this.notifySubscribers(this[observableLatestValue], 'beforeChange'); }
};
// Note that for browsers that don't support proto assignment, the