import { consoleSizeViaFFI } from "https://deno.land/x/dxx@rf/src/lib/consoleSizeViaFFI.ts";
Get the size of the console as columns/rows, via the FFI.
- unstable ~ requires the Deno
--unstable
flag for successful resolution (b/c the usedunstable.UnsafePointer
is unstable API, as of Deno v1.19.0 [2023-01-01; rivy])
const { columns, rows } = consoleSizeViaFFI();
Returns
ConsoleSize | undefined