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
options_: Partial<ConsoleSizeOptions> = [UNSUPPORTED]Returns
Promise<ConsoleSize | undefined>