@hyperfrontend/immutable-api-utils/built-in-copy/consoleconsole
Locked, prototype-pollution-resistant copies of the global console methods, pre-bound to the original console object.
log, warn, error, info, debug, trace, dir, table, assert, group*, time*, and the rest of the console surface are captured (and .bind()-ed) at module-load time and frozen into a tamper-proof namespace, so diagnostic output keeps reaching the real console even if globalThis.console is later patched. Effective only when imported before any untrusted code has had a chance to mutate the prototype chain.
API Reference
● Variables
(Safe copy) Writes an error message to the console if the assertion is false.
(Safe copy) Clears the console.
(Safe copy) Namespace object containing all Console methods. Note: Importing this imports all methods in this namespace (no tree-shaking).
(Safe copy) Logs the number of times that this particular call to count() has been called.
(Safe copy) Resets the counter used with console.count().
(Safe copy) Outputs a debug message to the console.
(Safe copy) Displays an interactive listing of the properties of a specified object.
(Safe copy) Outputs an error message to the console.
(Safe copy) Creates a new inline group in the console.
(Safe copy) Creates a new inline group in the console that is initially collapsed.
(Safe copy) Exits the current inline group.
(Safe copy) Outputs an informational message to the console.
(Safe copy) Outputs a message to the console.
(Safe copy) Displays tabular data as a table.
(Safe copy) Starts a timer with a name specified as an input parameter.
(Safe copy) Stops a timer that was previously started.
(Safe copy) Logs the current value of a timer that was previously started.
(Safe copy) Outputs a stack trace to the console.
(Safe copy) Outputs a warning message to the console.