standard-stream.js
This file
Path
lib/utils/standard-stream.js
6 lines · 367 bytes · JavaScript
Last changed by
Rename files (#977)ehmickybefore adoption4b2e316
History of this fileTake it
Rename files (#977)ehmickybefore adoption4b2e316
lines 1–6why, one step back1import process from 'node:process';23export const isStandardStream = stream => STANDARD_STREAMS.includes(stream);4export const STANDARD_STREAMS = [process.stdin, process.stdout, process.stderr];5export const STANDARD_STREAMS_ALIASES = ['stdin', 'stdout', 'stderr'];6export const getStreamName = fdNumber => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;