function terminalWidth
terminalWidth(output: NodeJS.WritableStream): number

How wide a line may be. 80 where nothing says — a pipe has no width, and neither does a file.

import { terminalWidth } from './terminal.ts';

terminalWidth({ write: () => true } as never); // 80 — nothing there to ask

Parameters

output: NodeJS.WritableStream

Return Type

number

Usage

import { terminalWidth } from "lib/repl/terminal.ts";