diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2023-11-12 20:52:59 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-13 04:52:59 +0000 |
commit | 1ef617e8f3d48098e69e222b6eb6fe981aeca1c3 (patch) | |
tree | 8ab4fab5b5b248d51575e874f240c16fba4ae268 /ext | |
parent | 39223f709bcb86069f3aa8eab7a4be80304128e6 (diff) |
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
Diffstat (limited to 'ext')
-rw-r--r-- | ext/console/01_console.js | 10 |
1 files changed, 5 insertions, 5 deletions
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, }; |