code: 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);
  }
docs: TTY Stream