watch-deep
A small library to watch deep changes in objects, arrays with support for ES6 Map
and Set
.
const obj = // These changes will be detectedobjmap = objmapobjmapadelete objmap const a = b: 123 obja = a// This won't be detected because the object must first be proxied and then// retrieved from the object tree to observe changes.ab = 999 // Also keep in mind that proxied objects that have been deleted from the// object tree will also trigger a change.const b = objadelete objaba = 1
Be careful with circular references since those will cause a stack overflow.