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

Function makePaths

dash/dash-renderer/tests/dependencies.test.js:11–27  ·  view source on GitHub ↗
(stringIds, wildcardItems)

Source from the content-addressed store, hash-verified

9// Build a paths fixture that matches the layout crawling output
10// (paths.strs for string ids, paths.objs for wildcard ids).
11function makePaths(stringIds, wildcardItems) {
12 const paths = {
13 strs: {},
14 objs: {},
15 events: new EventEmitter()
16 };
17 stringIds.forEach(id => {
18 paths.strs[id] = ['props', 'children', 0];
19 });
20 Object.entries(wildcardItems || {}).forEach(([keyStr, items]) => {
21 paths.objs[keyStr] = items.map((values, i) => ({
22 values,
23 path: ['props', 'children', i]
24 }));
25 });
26 return paths;
27}
28
29describe('dependencies — MATCH validation (#2462)', () => {
30 let errors;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…