Init
This commit is contained in:
commit
4e066bffc9
10017 changed files with 1322084 additions and 0 deletions
28
node_modules/cli-width/index.js
generated
vendored
Normal file
28
node_modules/cli-width/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
'use strict';
|
||||
|
||||
exports = module.exports = cliWidth;
|
||||
exports.defaultWidth = 0;
|
||||
|
||||
function cliWidth() {
|
||||
if (process.stdout.getWindowSize) {
|
||||
return process.stdout.getWindowSize()[0] || exports.defaultWidth;
|
||||
}
|
||||
else {
|
||||
var tty = require('tty');
|
||||
|
||||
if (tty.getWindowSize) {
|
||||
return tty.getWindowSize()[1] || exports.defaultWidth;
|
||||
}
|
||||
else {
|
||||
if (process.env.CLI_WIDTH) {
|
||||
var width = parseInt(process.env.CLI_WIDTH, 10);
|
||||
|
||||
if (!isNaN(width)) {
|
||||
return width;
|
||||
}
|
||||
}
|
||||
|
||||
return exports.defaultWidth;
|
||||
}
|
||||
}
|
||||
};
|
||||
Loading…
Reference in a new issue