MCPcopy Create free account
hub / github.com/plotly/plotly.js / crawl

Function crawl

src/plots/command.js:402–417  ·  view source on GitHub ↗
(attrs, callback, path, depth)

Source from the content-addressed store, hash-verified

400}
401
402function crawl(attrs, callback, path, depth) {
403 Object.keys(attrs).forEach(function(attrName) {
404 var attr = attrs[attrName];
405
406 if(attrName[0] === '_') return;
407
408 var thisPath = path + (depth > 0 ? '.' : '') + attrName;
409
410 if(Lib.isPlainObject(attr)) {
411 crawl(attr, callback, thisPath, depth + 1);
412 } else {
413 // Only execute the callback on leaf nodes:
414 callback(thisPath, attrName, attr);
415 }
416 });
417}

Callers 2

computeLayoutBindingsFunction · 0.70
computeDataBindingsFunction · 0.70

Calls 1

callbackFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…