MCPcopy
hub / github.com/tdewolff/minify / getDependencies

Function getDependencies

_benchmarks/sample_echarts.js:17287–17302  ·  view source on GitHub ↗
(componentType)

Source from the content-addressed store, hash-verified

17285 enableTopologicalTravel(ComponentModel, getDependencies);
17286
17287 function getDependencies(componentType) {
17288 var deps = [];
17289 each(ComponentModel.getClassesByMainType(componentType), function (clz) {
17290 deps = deps.concat(clz.dependencies || clz.prototype.dependencies || []);
17291 }); // Ensure main type.
17292
17293 deps = map(deps, function (type) {
17294 return parseClassType(type).main;
17295 }); // Hack dataset for convenience.
17296
17297 if (componentType !== 'dataset' && indexOf(deps, 'dataset') <= 0) {
17298 deps.unshift('dataset');
17299 }
17300
17301 return deps;
17302 }
17303
17304 /*
17305 * Licensed to the Apache Software Foundation (ASF) under one

Callers

nothing calls this directly

Calls 4

parseClassTypeFunction · 0.85
eachFunction · 0.70
mapFunction · 0.70
indexOfFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…