1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | function termwidth(stream) {
|
4 | if (!stream.isTTY) {
|
5 | return 80;
|
6 | }
|
7 | const width = stream.getWindowSize()[0];
|
8 | if (width < 1) {
|
9 | return 80;
|
10 | }
|
11 | if (width < 40) {
|
12 | return 40;
|
13 | }
|
14 | return width;
|
15 | }
|
16 | const columns = global.columns;
|
17 | exports.stdtermwidth = columns || termwidth(process.stdout);
|
18 | exports.errtermwidth = columns || termwidth(process.stderr);
|