(rawTransOption, sourceList, infoForPrint)
| 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) { |
no test coverage detected
searching dependent graphs…