From 1ef617e8f3d48098e69e222b6eb6fe981aeca1c3 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Sun, 12 Nov 2023 20:52:59 -0800 Subject: perf: lazy bootstrap options - first pass (#21164) Move most runtime options to be lazily loaded. Constant options will be covered in a different PR. Towards https://github.com/denoland/deno/issues/21133 --- ext/console/01_console.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ext/console') diff --git a/ext/console/01_console.js b/ext/console/01_console.js index a766bb641..67c75f74d 100644 --- a/ext/console/01_console.js +++ b/ext/console/01_console.js @@ -137,14 +137,14 @@ const { isNaN, } = primordials; -let noColor = false; +let noColor = () => false; -function setNoColor(value) { - noColor = value; +function setNoColorFn(fn) { + noColor = fn; } function getNoColor() { - return noColor; + return noColor(); } function assert(cond, msg = "Assertion failed.") { @@ -3646,7 +3646,7 @@ export { inspect, inspectArgs, quoteString, - setNoColor, + setNoColorFn, styles, wrapConsole, }; -- cgit v1.2.3