import { consoleSizeSync } from "https://deno.land/x/dxx@rf/src/lib/consoleSize.ts";
Get the size of the console used by rid
as columns/rows, using options
.
- unstable ~ requires the Deno
--unstable
flag for successful resolution (b/c the usedDeno.consoleSize()
function is unstable API [as of Deno v1.19.0, 2022-02-17]) - results are cached; cached entries will be ignored/skipped when using the
{ useCache: false }
option
const { columns, rows } = consoleSizeSync(Deno.stdout.rid, {...});
Parameters
optional
options_: Partial<ConsoleSizeOptions> = [UNSUPPORTED]Returns
ConsoleSize | undefined