DeltaPlane
Proxy to keep original data unchanged, but read and write changes using additional layer - 'delta' object.
npm install deltaplane
var o = a:b:c:'original' hello: 'world'; var dp = ;var p = dp;// if not changed then read from originalconsole; // 'original'console; // 'world'// collect all changes in separate 'delta' objectpabc = 1;// read changed values from deltaconsole; // '1'// not changed value is still thereconsole; // 'world'// delta will have only changesconsole; // { a:{b:{c:1}}};console;// original object is still safe.// use existing deltasvar delta = hello:"hi";dp = ;p = dp;console;console;pabc = 2;console; p = dp;// specify base level other then root.pc = 3;console; p = dp;// specify base level for not existing originalpz='ZZZZ'; console;