UNPKG

cli-width

Version:

Get stdout window width, with two fallbacks, tty and then a default.

14 lines (10 loc) 267 B
// Type definitions for cli-width 4.0 /// <reference types="node" /> import { Stream } from 'stream'; import tty = require('tty'); declare function cliWidth(options?: { defaultWidth?: number; output?: Stream; tty?: typeof tty; }): number; export = cliWidth;