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

Function applyDataTransform

_benchmarks/sample_echarts.js:21420–21444  ·  view source on GitHub ↗
(rawTransOption, sourceList, infoForPrint)

Source from the content-addressed store, hash-verified

21418 externalTransformMap.set(type, externalTransform);
21419 }
21420 function applyDataTransform(rawTransOption, sourceList, infoForPrint) {
21421 var pipedTransOption = normalizeToArray(rawTransOption);
21422 var pipeLen = pipedTransOption.length;
21423 var errMsg = '';
21424
21425 if (!pipeLen) {
21426 if ("development" !== 'production') {
21427 errMsg = 'If `transform` declared, it should at least contain one transform.';
21428 }
21429
21430 throwError(errMsg);
21431 }
21432
21433 for (var i = 0, len = pipeLen; i < len; i++) {
21434 var transOption = pipedTransOption[i];
21435 sourceList = applySingleDataTransform(transOption, sourceList, infoForPrint, pipeLen === 1 ? null : i); // piped transform only support single input, except the fist one.
21436 // piped transform only support single output, except the last one.
21437
21438 if (i !== len - 1) {
21439 sourceList.length = Math.max(sourceList.length, 1);
21440 }
21441 }
21442
21443 return sourceList;
21444 }
21445
21446 function applySingleDataTransform(transOption, upSourceList, infoForPrint, // If `pipeIndex` is null/undefined, no piped transform.
21447 pipeIndex) {

Callers 1

sample_echarts.jsFile · 0.85

Calls 3

normalizeToArrayFunction · 0.85
throwErrorFunction · 0.85
applySingleDataTransformFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…