179 breaking releases

new 0.182.0 Dec 11, 2024
0.180.0 Nov 28, 2024
0.164.0 Jul 31, 2024
0.143.0 Mar 28, 2024
0.2.0 Mar 21, 2021

#1980 in Web programming

Download history 4589/week @ 2024-08-22 4240/week @ 2024-08-29 4481/week @ 2024-09-05 3499/week @ 2024-09-12 4597/week @ 2024-09-19 5174/week @ 2024-09-26 3819/week @ 2024-10-03 3989/week @ 2024-10-10 4688/week @ 2024-10-17 4032/week @ 2024-10-24 4085/week @ 2024-10-31 4122/week @ 2024-11-07 3894/week @ 2024-11-14 4869/week @ 2024-11-21 4317/week @ 2024-11-28 3516/week @ 2024-12-05

17,177 downloads per month
Used in 63 crates (24 directly)

MIT license

110KB
3K SLoC

JavaScript 3K SLoC // 0.1% comments TypeScript 33 SLoC // 0.2% comments Rust 30 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

~85MB
~1.5M SLoC