Skip to content
Myr

cleanup

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Michel Weststrate · committed by Michel Weststrate · parent 9d393e3 · Browse files · 2 files+7 added−9 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+7 added−9 removed

  • other:+7 added−9 removed

2 files+7 added−9 removed

modified:src/es5.js+4 added-3 removed
66 unmodified lines
67}6869// creates a proxy for plain objects / arrays70function createProxy(parent, base) {71 let proxy72 if (Array.isArray(base)) proxy = createArrayProxy(base)73 else proxy = createObjectProxy(base)71 const proxy = Array.isArray(base)72 ? createArrayProxy(base)73 : createObjectProxy(base)74 const state = createState(parent, proxy, base)75 createHiddenProperty(proxy, PROXY_STATE, state)76 states.push(state)77 return proxy
109 unmodified lines
187 each(states, (_, state) => {188 state.finalizing = true189 })190 // find and mark all changes (for parts not done yet)191 // TODO: store states by depth, to be able guarantee processing leaves first192 markChanges()193 const res = finalize(rootClone)194 // make sure all proxies become unusable195 each(states, (_, state) => {
40 unmodified lines
modified:src/proxy.js+3 added-6 removed