JSPM

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

Inspect utility for Node.js and Browsers.

Package Exports

  • @visulima/inspector
  • @visulima/inspector/package.json

Readme

visulima inspector

Inspect utility for Node.js and Browsers.


[typescript-image][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url]


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][license-url]

[typescript-url]: https://www.typescriptlang.org/ "TypeScript" "typescript" [license-image]: https://img.shields.io/npm/l/@visulima/inspector?color=blueviolet&style=for-the-badge [license-url]: LICENSE.md "license" [npm-image]: https://img.shields.io/npm/v/@visulima/inspector/latest.svg?style=for-the-badge&logo=npm [npm-url]: https://www.npmjs.com/package/@visulima/inspector/v/latest "npm"