2025-04-02 06:50:39 -04:00

14 lines
356 B
JavaScript

export default function setBlocking(blocking) {
if (typeof process === 'undefined') return;
[process.stdout, process.stderr].forEach((_stream) => {
const stream = _stream;
if (
stream._handle &&
stream.isTTY &&
typeof stream._handle.setBlocking === 'function'
) {
stream._handle.setBlocking(blocking);
}
});
}