199 breaking releases

new 0.202.0 Apr 18, 2025
0.200.0 Apr 11, 2025
0.197.0 Mar 28, 2025
0.184.0 Dec 19, 2024
0.2.0 Mar 21, 2021

#172 in Debugging

Download history 1814/week @ 2024-12-27 3238/week @ 2025-01-03 5452/week @ 2025-01-10 5619/week @ 2025-01-17 5574/week @ 2025-01-24 4754/week @ 2025-01-31 5295/week @ 2025-02-07 5466/week @ 2025-02-14 6244/week @ 2025-02-21 6269/week @ 2025-02-28 4122/week @ 2025-03-07 5079/week @ 2025-03-14 5360/week @ 2025-03-21 4679/week @ 2025-03-28 4501/week @ 2025-04-04 4343/week @ 2025-04-11

19,662 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