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

Function getStandardStream

lib/stdio/native.js:98–106  ·  view source on GitHub ↗
(fdNumber, value, optionName)

Source from the content-addressed store, hash-verified

96// Since this is an edge case, we simply throw an error message.
97// See https://github.com/sindresorhus/execa/pull/643#discussion_r1435905707
98const getStandardStream = (fdNumber, value, optionName) => {
99 const standardStream = STANDARD_STREAMS[fdNumber];
100
101 if (standardStream === undefined) {
102 throw new TypeError(`The \`${optionName}: ${value}\` option is invalid: no such standard stream.`);
103 }
104
105 return standardStream;
106};

Callers 1

handleNativeStreamAsyncFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected