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

Function parseOption

_benchmarks/sample_echarts.js:90911–90937  ·  view source on GitHub ↗
(exprOption, getters)

Source from the content-addressed store, hash-verified

90909 }();
90910
90911 function parseOption(exprOption, getters) {
90912 if (exprOption === true || exprOption === false) {
90913 var cond = new ConstConditionInternal();
90914 cond.value = exprOption;
90915 return cond;
90916 }
90917
90918 var errMsg = '';
90919
90920 if (!isObjectNotArray(exprOption)) {
90921 if ("development" !== 'production') {
90922 errMsg = makePrintable('Illegal config. Expect a plain object but actually', exprOption);
90923 }
90924
90925 throwError(errMsg);
90926 }
90927
90928 if (exprOption.and) {
90929 return parseAndOrOption('and', exprOption, getters);
90930 } else if (exprOption.or) {
90931 return parseAndOrOption('or', exprOption, getters);
90932 } else if (exprOption.not) {
90933 return parseNotOption(exprOption, getters);
90934 }
90935
90936 return parseRelationalOption(exprOption, getters);
90937 }
90938
90939 function parseAndOrOption(op, exprOption, getters) {
90940 var subOptionArr = exprOption[op];

Callers 3

parseAndOrOptionFunction · 0.85
parseNotOptionFunction · 0.85

Calls 6

isObjectNotArrayFunction · 0.85
makePrintableFunction · 0.85
throwErrorFunction · 0.85
parseAndOrOptionFunction · 0.85
parseNotOptionFunction · 0.85
parseRelationalOptionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…