MCPcopy Create free account
hub / github.com/sindresorhus/execa / normalizeTransforms

Function normalizeTransforms

lib/transform/normalize.js:8–11  ·  view source on GitHub ↗
(stdioItems, optionName, direction, options)

Source from the content-addressed store, hash-verified

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

Callers 1

getFileDescriptorFunction · 0.90

Calls 1

getTransformsFunction · 0.85

Tested by

no test coverage detected