Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/runtime.ts>customInspect

A JavaScript extension package for building strong and modern applications.
Latest
variable customInspect
import { customInspect } from "https://deno.land/x/ayonli_jsext@v0.9.72/runtime.ts";

A unified symbol that can be used to customize the inspection behavior of an object, currently supports Node.js, Bun and Deno.

Examples

Example 1

import { customInspect } from "@ayonli/jsext/runtime";

class Point {
    constructor(public x: number, public y: number) {}

   [customInspect]() {
       return `Point (${this.x}, ${this.y})`;
   }
}

console.log(new Point(1, 2)); // Point (1, 2)

type

unique symbol