deno_lib 0.2.0

Shared code between the Deno CLI and denort
Documentation
1
2
3
4
5
6
7
8
9
10
// Copyright 2018-2025 the Deno authors. MIT license.

pub fn has_trace_permissions_enabled() -> bool {
  has_flag_env_var("DENO_TRACE_PERMISSIONS")
}

pub fn has_flag_env_var(name: &str) -> bool {
  let value = std::env::var(name);
  matches!(value.as_ref().map(|s| s.as_str()), Ok("1"))
}