Sha256: 56adf35db1cb5de96d3dd1427ac064d2c888461f9e9228ecb8d18e33c7ae44d9
Contents?: true
Size: 525 Bytes
Versions: 62
Compression:
Stored size: 525 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 { if (process.env.CLI_WIDTH) { var width = parseInt(process.env.CLI_WIDTH, 10); if (!isNaN(width)) { return width; } } return exports.defaultWidth; } } };
Version data entries
62 entries across 62 versions & 1 rubygems