(stdioItems, optionName, direction, options)
| 6 | // Transforms generators/duplex/TransformStream can have multiple shapes. |
| 7 | // This normalizes it and applies default values. |
| 8 | export const normalizeTransforms = (stdioItems, optionName, direction, options) => [ |
| 9 | ...stdioItems.filter(({type}) => !TRANSFORM_TYPES.has(type)), |
| 10 | ...getTransforms(stdioItems, optionName, direction, options), |
| 11 | ]; |
| 12 | |
| 13 | const getTransforms = (stdioItems, optionName, direction, {encoding}) => { |
| 14 | const transforms = stdioItems.filter(({type}) => TRANSFORM_TYPES.has(type)); |
no test coverage detected