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

Function normalizeTransform

lib/transform/normalize.js:31–52  ·  view source on GitHub ↗
({stdioItem, stdioItem: {type}, index, newTransforms, optionName, direction, encoding})

Source from the content-addressed store, hash-verified

29};
30
31const normalizeTransform = ({stdioItem, stdioItem: {type}, index, newTransforms, optionName, direction, encoding}) => {
32 if (type === 'duplex') {
33 return normalizeDuplex({stdioItem, optionName});
34 }
35
36 if (type === 'webTransform') {
37 return normalizeTransformStream({
38 stdioItem,
39 index,
40 newTransforms,
41 direction,
42 });
43 }
44
45 return normalizeGenerator({
46 stdioItem,
47 index,
48 newTransforms,
49 direction,
50 encoding,
51 });
52};
53
54const normalizeDuplex = ({stdioItem, optionName}) => {
55 const {value} = stdioItem;

Callers 1

getTransformsFunction · 0.85

Calls 3

normalizeDuplexFunction · 0.85
normalizeTransformStreamFunction · 0.85
normalizeGeneratorFunction · 0.85

Tested by

no test coverage detected