MCPcopy Index your code
hub / github.com/plotly/dash / handlePatch

Function handlePatch

dash/dash-renderer/src/actions/patch.ts:291–305  ·  view source on GitHub ↗
(previousValue: T, patchValue: any)

Source from the content-addressed store, hash-verified

289};
290
291export function handlePatch<T>(previousValue: T, patchValue: any): T {
292 let reducedValue = previousValue;
293
294 for (let i = 0; i < patchValue.operations.length; i++) {
295 const patch = patchValue.operations[i];
296 patch.location = getLocationPath(patch.location, reducedValue);
297 const handler = patchHandlers[patch.operation];
298 if (!handler) {
299 throw new Error(`Invalid Operation ${patch.operation}`);
300 }
301 reducedValue = handler(reducedValue, patch);
302 }
303
304 return reducedValue;
305}
306
307export function parsePatchProps(
308 props: any,

Callers 1

parsePatchPropsFunction · 0.85

Calls 2

getLocationPathFunction · 0.85
handlerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…