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

Function validateNonGeneratorType

lib/stdio/type.js:76–80  ·  view source on GitHub ↗
({final, binary, objectMode}, optionName, typeName)

Source from the content-addressed store, hash-verified

74};
75
76const validateNonGeneratorType = ({final, binary, objectMode}, optionName, typeName) => {
77 checkUndefinedOption(final, `${optionName}.final`, typeName);
78 checkUndefinedOption(binary, `${optionName}.binary`, typeName);
79 checkBooleanOption(objectMode, `${optionName}.objectMode`);
80};
81
82const checkUndefinedOption = (value, optionName, typeName) => {
83 if (value !== undefined) {

Callers 2

getDuplexTypeFunction · 0.85
getTransformStreamTypeFunction · 0.85

Calls 2

checkUndefinedOptionFunction · 0.85
checkBooleanOptionFunction · 0.85

Tested by

no test coverage detected