1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-10 16:11:13 -05:00
denoland-deno/cli/util/console.rs

10 lines
279 B
Rust
Raw Normal View History

2024-12-31 14:12:39 -05:00
// Copyright 2018-2025 the Deno authors. MIT license.
use deno_runtime::ops::tty::ConsoleSize;
/// Gets the console size.
pub fn console_size() -> Option<ConsoleSize> {
let stderr = &deno_runtime::deno_io::STDERR_HANDLE;
deno_runtime::ops::tty::console_size(stderr).ok()
}