@visulima/inspector
v1.0.13
Published
Inspect utility for Node.js and Browsers.
Downloads
3,094
Maintainers
Readme
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.
Related
- object-inspect - string representations of objects in node and the browser
- loupe - Inspect utility for Node.js and browsers
- util.inspect
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