botbook/node_modules/yargs/build/lib/utils/set-blocking.js
Rodrigo Rodriguez 6ae15fe3e5 Updated.
2024-09-04 13:13:15 -03:00

12 lines
386 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);
}
});
}