silverwolf-x's picture
download
raw
608 Bytes
use std::env;
const DEBUG_JS_VAR: &str = "TURBOPACK_DEBUG_JS";
/// Checks if the operation passed is included in the `TURBOPACK_DEBUG_JS` env
/// var to enable node.js debugging at runtime.
///
/// This is preferable to manually passing a boolean because recompiling won't
/// be necessary.
pub fn should_debug(operation: &str) -> bool {
// TODO(sokra) It's not filesystem cache safe to read an env var this way.
// This must use turbo_tasks_env instead.
let Ok(val) = env::var(DEBUG_JS_VAR) else {
return false;
};
val == "*" || val.split(',').any(|part| part == operation)
}

Xet Storage Details

Size:
608 Bytes
·
Xet hash:
deb55cdfa256f9f739b4f5e1272ed4da145607b1a1b79449e521ca2ad8ed5a12

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.