Returns a list of affected (accessed) JSON paths (and sub-paths) in the value. This function is provided mostly as a debugging tool to see which JSON paths might have caused the cache invalidation in memoize().
value
memoize()
IWatcher
import { watch, getAffectedPaths } from '@indutny/sneequals';const value = { a: { b: 1 } };const { proxy, watcher } = watch(value);// Prints `1`console.log(proxy.a.b);// Prints `['a.b']`console.log(getAffectedPaths(watcher, value));
A watcher object that tracked the access to paths/sub-paths of the value
A value tracked by watcher
watcher
Generated using TypeDoc
Returns a list of affected (accessed) JSON paths (and sub-paths) in the
value
. This function is provided mostly as a debugging tool to see which JSON paths might have caused the cache invalidation inmemoize()
.See
IWatcher
instance.Example