BE-SPAN/node_modules/set-blocking/index.js
githubna-ilham 722cd440e8 first commit
2024-10-20 22:04:16 +07:00

8 lines
252 B
JavaScript

module.exports = function (blocking) {
[process.stdout, process.stderr].forEach(function (stream) {
if (stream._handle && stream.isTTY && typeof stream._handle.setBlocking === 'function') {
stream._handle.setBlocking(blocking)
}
})
}