Socket
Socket
Sign inDemoInstall

tty-browserify

Package Overview
Dependencies
Maintainers
39
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tty-browserify

the tty module from node core for browsers


Version published
Weekly downloads
7.9M
increased by3.02%
Maintainers
39
Weekly downloads
 
Created

What is tty-browserify?

The tty-browserify npm package is a version of the Node.js 'tty' module that can be used in the browser. It provides basic functionality of the Node.js 'tty' module, allowing for the emulation of terminal-related features within a web environment. This package is primarily used in bundling tools like Browserify to shim the 'tty' module when code that uses it is being prepared to run in the browser.

What are tty-browserify's main functionalities?

isatty

The 'isatty' method is used to determine if a given file descriptor is associated with a terminal. In the context of a browser, this will always return false, as the browser does not have file descriptors associated with terminals.

var tty = require('tty-browserify');
console.log(tty.isatty(1)); // always returns false in the browser

ReadStream and WriteStream

The 'ReadStream' and 'WriteStream' classes are part of the Node.js 'tty' module API. However, in the browser context, these classes do not have the same capabilities as in Node.js, and their functionality is limited or non-existent.

var tty = require('tty-browserify');
var rs = new tty.ReadStream();
var ws = new tty.WriteStream();

Other packages similar to tty-browserify

Keywords

FAQs

Package last updated on 27 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc