0.1.0 • Published 10 years ago

restoretty v0.1.0

Weekly downloads
4
License
-
Repository
github
Last release
10 years ago

restoretty

Turn off TTY raw mode

Example

var openTTY = require('opentty');
var restoreTTY = require('restoretty');

var tty = openTTY();

// quit on Q pressed
tty.on('data', function (d) {
    for (var i = 0; i < d.length; d++) {
        if (d[i] === 0x71) {
            restoreTTY();  // turn off raw mode
            return process.exit();
        }
    }
});

Installation

npm install restoretty

Contributors

  • Matt-Esch

MIT Licenced