knockout
knockout copied to clipboard
Add ko.computedContext to replace/supplement ko.dependencyDetection and more
ko.computedContext can include some public functions such as
- getDependencyCount - return number of dependencies so far in current evaluation. see knockout/knockout#627
- isDependency - return whether an observable is a dependency in current evaluation
- isInitial - is this the first evaluation of the computed?
- didChange - if the given observable was previously a dependency, return whether this evaluation was due to a change in that observable (only really useful when the computed is used as a reactor) see #22
- computed - the current computed observable