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

Function getStandardStreamDirection

lib/stdio/direction.js:75–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73};
74
75const getStandardStreamDirection = value => {
76 if ([0, process.stdin].includes(value)) {
77 return 'input';
78 }
79
80 if ([1, 2, process.stdout, process.stderr].includes(value)) {
81 return 'output';
82 }
83};
84
85// When ambiguous, we initially keep the direction as `undefined`.
86// This allows arrays of `stdio` values to resolve the ambiguity.

Callers 1

nativeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected