mirror of
https://github.com/denoland/deno.git
synced 2024-11-23 15:16:54 -05:00
8 lines
224 B
Rust
8 lines
224 B
Rust
|
use deno_runtime::ops::tty::ConsoleSize;
|
||
|
|
||
|
/// Gets the console size.
|
||
|
pub fn console_size() -> Option<ConsoleSize> {
|
||
|
let stderr = &deno_runtime::ops::io::STDERR_HANDLE;
|
||
|
deno_runtime::ops::tty::console_size(stderr).ok()
|
||
|
}
|