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

Function initializeStdioValueObject

lib/stdio/handle.js:100–109  ·  view source on GitHub ↗
({value, input}, optionName)

Source from the content-addressed store, hash-verified

98
99// The `{value, input}` object form wraps any stdio value with an explicit direction.
100const initializeStdioValueObject = ({value, input}, optionName) => {
101 checkBooleanOption(input, `${optionName}.input`);
102
103 return {
104 type: getStdioItemType(value, optionName),
105 value,
106 direction: input ? 'input' : undefined,
107 optionName,
108 };
109};
110
111const validateStdioArray = (stdioItems, isStdioArray, optionName) => {
112 if (stdioItems.length === 0) {

Callers 1

initializeStdioItemFunction · 0.85

Calls 2

checkBooleanOptionFunction · 0.90
getStdioItemTypeFunction · 0.90

Tested by

no test coverage detected