191 breaking releases

new 0.194.0 Mar 5, 2025
0.192.0 Feb 20, 2025
0.184.0 Dec 19, 2024
0.180.0 Nov 28, 2024
0.2.0 Mar 21, 2021

#1628 in Web programming

Download history 4377/week @ 2024-11-17 4305/week @ 2024-11-24 4673/week @ 2024-12-01 4780/week @ 2024-12-08 4899/week @ 2024-12-15 1990/week @ 2024-12-22 1836/week @ 2024-12-29 4445/week @ 2025-01-05 5225/week @ 2025-01-12 5406/week @ 2025-01-19 5604/week @ 2025-01-26 5132/week @ 2025-02-02 5272/week @ 2025-02-09 5090/week @ 2025-02-16 6508/week @ 2025-02-23 5877/week @ 2025-03-02

23,273 downloads per month
Used in 61 crates (24 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

~92MB
~2M SLoC