0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
denoland-deno/cli/util/console.rs
Bartek Iwańczuk 8c026dab92
feat: improve download progress bar (#16984)
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-12-12 20:52:10 -05:00

7 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()
}