(options)
| 109483 | } |
| 109484 | |
| 109485 | function cliWidth(options) { |
| 109486 | var opts = normalizeOpts(options); |
| 109487 | |
| 109488 | if (opts.output.getWindowSize) { |
| 109489 | return opts.output.getWindowSize()[0] || opts.defaultWidth; |
| 109490 | } else { |
| 109491 | if (opts.tty.getWindowSize) { |
| 109492 | return opts.tty.getWindowSize()[1] || opts.defaultWidth; |
| 109493 | } else { |
| 109494 | if (opts.output.columns) { |
| 109495 | return opts.output.columns; |
| 109496 | } else { |
| 109497 | if (process.env.CLI_WIDTH) { |
| 109498 | var width = parseInt(process.env.CLI_WIDTH, 10); |
| 109499 | |
| 109500 | if (!isNaN(width) && width !== 0) { |
| 109501 | return width; |
| 109502 | } |
| 109503 | } |
| 109504 | } |
| 109505 | |
| 109506 | return opts.defaultWidth; |
| 109507 | } |
| 109508 | } |
| 109509 | }; |
| 109510 | |
| 109511 | |
| 109512 | /***/ }), |
no test coverage detected