160 breaking releases
new 0.163.0 | Jul 26, 2024 |
---|---|
0.161.0 | Jul 12, 2024 |
0.143.0 | Mar 28, 2024 |
0.129.0 | Dec 21, 2023 |
0.2.0 | Mar 21, 2021 |
#10 in #spec
20,954 downloads per month
Used in 52 crates
(21 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
~94MB
~2M SLoC