Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/dxx/src/lib/consoleSize.ts>consoleSizeSync

๐Ÿš€ (Deno) enhanced executor
Latest
function consoleSizeSync
Unstable
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 used Deno.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
rid: number = [UNSUPPORTED]

~ resource ID

optional
options_: Partial<ConsoleSizeOptions> = [UNSUPPORTED]

Returns

ConsoleSize | undefined