JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 396
  • Score
    100M100P100Q105440F
  • License MIT

Inspect utility for Node.js and Browsers.

Package Exports

    Readme

    visulima inspector

    Inspect utility for Node.js and Browsers.


    typescript-image npm-image license-image


    Daniel Bannert's open source work is supported by the community on GitHub Sponsors


    Install

    npm install @visulima/inspector
    yarn add @visulima/inspector
    pnpm add @visulima/inspector

    Usage

    import { inspect } from "@visulima/inspector";
    
    console.log(inspect({ foo: "bar" })); // { foo: 'bar' }

    Circular

    import { inspect } from "@visulima/inspector";
    
    const obj = { a: 1, b: [3, 4] };
    obj.c = obj;
    
    console.log(inspect(obj)); // { a: 1, b: [ 3, 4 ], c: [Circular] }

    API

    inspect(input: any, options?: InspectOptions): string

    input

    Type: any

    The input value to inspect.

    options

    Type: InspectOptions

    The options for the inspect function.

    options.breakLength

    Type: number

    Default: Number.POSITIVE_INFINITY

    options.customInspect

    Type: boolean

    Default: true

    options.depth

    Type: number

    Default: 5

    The maximum depth to traverse.

    options.indent

    Type: number | "\t" | undefined

    Default: undefined

    The indentation to use.

    Supported Node.js Versions

    Libraries in this ecosystem make the best effort to track Node.js’ release schedule. Here’s a post on why we think this is important.

    Contributing

    If you would like to help take a look at the list of issues and check our Contributing guidelines.

    Note: please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

    Credits

    License

    The visulima inspector is open-sourced software licensed under the MIT