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

Download history 1895/week @ 2024-12-23 1940/week @ 2024-12-30 4442/week @ 2025-01-06 5530/week @ 2025-01-13 5251/week @ 2025-01-20 5436/week @ 2025-01-27 5138/week @ 2025-02-03 5512/week @ 2025-02-10 4975/week @ 2025-02-17 6531/week @ 2025-02-24 5823/week @ 2025-03-03 4344/week @ 2025-03-10 5480/week @ 2025-03-17 4451/week @ 2025-03-24 4773/week @ 2025-03-31 4396/week @ 2025-04-07

19,439 downloads per month
Used in 63 crates (25 directly)

MIT license

110KB
3K SLoC

JavaScript 3K SLoC // 0.1% comments Rust 26 SLoC TypeScript 9 SLoC // 0.2% comments

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