Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

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

🚀 (Deno) enhanced executor
Latest
function consoleSizeAsync
import { consoleSizeAsync } 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.

  • async
  • results are cached; cache may be disabled via the { useCache: false } option
  • a fast synchronous method (with fallback to multiple racing asynchronous methods) is used for a robust, yet quick, result
const { columns, rows } = await consoleSizeAsync(Deno.stdout.rid, {...});

Parameters

optional
rid: number = [UNSUPPORTED]

~ resource ID

optional
options_: Partial<ConsoleSizeOptions> = [UNSUPPORTED]

Returns

Promise<ConsoleSize | undefined>