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

Function pruneCallbacks

dash/dash-renderer/src/actions/dependencies_ts.ts:403–438  ·  view source on GitHub ↗
(
    callbacks: T[],
    paths: any
)

Source from the content-addressed store, hash-verified

401});
402
403export function pruneCallbacks<T extends ICallback>(
404 callbacks: T[],
405 paths: any
406): {
407 added: T[];
408 removed: T[];
409} {
410 const [, removed] = partition(
411 ({getOutputs, callback: {outputs}}) =>
412 flatten(getOutputs(paths)).length === outputs.length,
413 callbacks
414 );
415
416 const [, modified] = partition(
417 ({getOutputs}) => !flatten(getOutputs(paths)).length,
418 removed
419 );
420
421 const added: any = map(
422 cb =>
423 assoc(
424 'changedPropIds',
425 pickBy(
426 (_, propId) => getPath(paths, splitIdAndProp(propId).id),
427 cb.changedPropIds
428 ),
429 cb
430 ),
431 modified
432 );
433
434 return {
435 added,
436 removed
437 };
438}
439
440export function resolveDeps(
441 refKeys?: any,

Callers 1

Calls 2

getPathFunction · 0.90
splitIdAndPropFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…