MCPcopy
hub / github.com/plotly/dash / getIds

Function getIds

dash/dash-renderer/src/observers/prioritizedCallbacks.ts:56–65  ·  view source on GitHub ↗
(cb: ICallback, paths: any)

Source from the content-addressed store, hash-verified

54};
55
56const getIds = (cb: ICallback, paths: any) => {
57 const items = [
58 ...flatten(cb.getInputs(paths)),
59 ...flatten(cb.getState(paths))
60 ];
61
62 const uniqueIds = new Map(items.map(item => [stringifyId(item.id), item]));
63 const uniqueItems = Array.from(uniqueIds.values());
64 return uniqueItems;
65};
66
67const observer: IStoreObserverDefinition<IStoreState> = {
68 observer: async ({dispatch, getState}) => {

Callers 1

Calls 2

stringifyIdFunction · 0.90
getStateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…