Sha256: ecfbcac206ccfbc6792b81fe2845e91f585ad5c565e685a3eeda7162e6a74b54

Contents?: true

Size: 360 Bytes

Versions: 2

Compression:

Stored size: 360 Bytes

Contents

'use strict';

exports = module.exports = cliWidth;
exports.defaultWidth = 0;

function cliWidth() {
  if (process.stdout.getWindowSize) {
    return process.stdout.getWindowSize()[0];
  }
  else {
    var tty = require('tty');

    if (tty.getWindowSize) {
      return tty.getWindowSize()[1];
    }
    else {
      return exports.defaultWidth;
    }
  }
};

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
eslint_node_modules-1.6.0.1 vendor/node_modules/eslint/node_modules/inquirer/node_modules/cli-width/index.js
eslint_node_modules-1.6.0 vendor/node_modules/eslint/node_modules/inquirer/node_modules/cli-width/index.js