Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function TTYStream(fd) {
// Could use: if (!require('tty').ReadStream)
if (version[0] === 0 && version[1] < 7) {
return new net.Socket(fd);
}
if (version[0] === 0 && version[1] < 12) {
return new tty.ReadStream(fd);
}
return new Socket(fd);
}