How to use the tty.getWindowSize function in tty

To help you get started, we’ve selected a few tty examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tj / term-canvas / examples / lines.js View on Github external
process.on('SIGWINCH', function(){
  size = tty.getWindowSize();
  canvas.width = size[1];
  canvas.height = size[0];
});
github rsms / move / lib / cli / optparse.js View on Github external
Parser.prototype.width = function() {
  if (process.stdout.isTTY) {
    return process.stdout.columns || require('tty').getWindowSize(process.stdout.fd)[1];
  } else {
    return 80;
  }
}
github fictivekin / webshell / wsreadline.js View on Github external
var getCols = function() {
  return tty.getWindowSize(process.stdin);
};
github dylang / changelog / lib / util.js View on Github external
function initWordWrap(width){
    if (!width) {
        width = TTY.getWindowSize()[1];
    }

    wordwrap = WordWrap(4, width);
}

tty

This package name is not currently in use, but was formerly occupied by another package. To avoid malicious use, npm is hanging on to the package name, but loosely, and we'll probably give it to you if you want it.

ISC
Latest version published 8 years ago

Package Health Score

53 / 100
Full package analysis