mirror of
https://github.com/denoland/deno.git
synced 2024-12-29 02:29:06 -05:00
7afa3aceb0
This is a prerequisite to factor out FS ops to a separate crate.
9 lines
300 B
Rust
9 lines
300 B
Rust
// Copyright 2018-2023 the Deno authors. All rights reserved. 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()
|
|
}
|