198 breaking releases
new 0.201.0 | Apr 14, 2025 |
---|---|
0.199.0 | Apr 5, 2025 |
0.197.0 | Mar 28, 2025 |
0.184.0 | Dec 19, 2024 |
0.2.0 | Mar 21, 2021 |
#171 in Debugging
19,439 downloads per month
Used in 63 crates
(25 directly)
110KB
3K
SLoC
deno_console
This crate implements the Console API.
Spec: https://console.spec.whatwg.org/
Usage Example
From javascript, include the extension's source, and assign a console to the global scope:
import * as console from "ext:deno_console/01_console.js";
Object.defineProperty(globalThis, "console", {
value: new console.Console((msg, level) =>
globalThis.Deno.core.print(msg, level > 1)
),
enumerable: false,
configurable: true,
writable: true,
});
Then from rust, provide deno_console::deno_console::init_ops_and_esm()
in the
extensions
field of your RuntimeOptions
Provided ops
Following ops are provided, which can be accessed through Deno.ops
:
- op_preview_entries
Dependencies
~93MB
~2M SLoC