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

Function parseFinder

_benchmarks/sample_echarts.js:7751–7774  ·  view source on GitHub ↗

* The same behavior as `component.getReferringComponents`.

(ecModel, finderInput, opt)

Source from the content-addressed store, hash-verified

7749 */
7750
7751 function parseFinder(ecModel, finderInput, opt) {
7752 var _a = preParseFinder(finderInput, opt),
7753 mainTypeSpecified = _a.mainTypeSpecified,
7754 queryOptionMap = _a.queryOptionMap,
7755 others = _a.others;
7756
7757 var result = others;
7758 var defaultMainType = opt ? opt.defaultMainType : null;
7759
7760 if (!mainTypeSpecified && defaultMainType) {
7761 queryOptionMap.set(defaultMainType, {});
7762 }
7763
7764 queryOptionMap.each(function (queryOption, mainType) {
7765 var queryResult = queryReferringComponents(ecModel, mainType, queryOption, {
7766 useDefault: defaultMainType === mainType,
7767 enableAll: opt && opt.enableAll != null ? opt.enableAll : true,
7768 enableNone: opt && opt.enableNone != null ? opt.enableNone : true
7769 });
7770 result[mainType + 'Models'] = queryResult.models;
7771 result[mainType + 'Model'] = queryResult.models[0];
7772 });
7773 return result;
7774 }
7775 function preParseFinder(finderInput, opt) {
7776 var finder;
7777

Callers 2

sample_echarts.jsFile · 0.85
parseFinder$1Function · 0.85

Calls 2

preParseFinderFunction · 0.85
queryReferringComponentsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…