Current collected state Current
Observed since 20 Oct, 17:41 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Pretty string representation of object
Simple utility for displaying a pretty eye-friendly colorful representation of an object for inspection purposes 👮.

npm i 0inspect
const inspect = require("0inspect");
// or const { inspect, log } = require("0inspect");
const objString = inspect(someObj);
console.log(objString);
// or shorter
inspect.log(someObj);
inspect(obj?: Any, options?: Object);
obj: Any: Object to inspect.options: Object: Options object.
depth: Number: Object nesting depth. Default: 10.inspect.log(obj?: Any, options?: Object);
console.log(inspect(obj, options)).| Color | Meaning |
|---|---|
| Green | Truthy Primitive |
| Red | Falsy Primitive |
| Cyan | Full Object |
| Yellow | Empty Object |
| Magenta | Function |
As this is using Chalk for console colors, the color support control is automatic, but you can still override it this way:
const chalk = require("chalk"); // Chalk v4.1.2
chalk.level = 0; // No color
💡 See: chalk # chalk.level
| Symbol | Meaning |
|---|---|
| ◆ | Truthy Primitive |
| ◇ | Falsy Primitive |
| ● | Full Object |
| ○ | Empty Object |
| ◉ | Function |
| Ø | No Class |
| → | Value |
| Input | Category | Output | Output Color |
|---|---|---|---|
1n | Truthy Primitive | ◆ BigInt → 1 | Green |
NaN | Falsy Primitive | ◇ Number → NaN | Red |
undefined | Falsy Primitive | ◇ Ø → undefined | Red |
{ a:"" } | Full Object | ● Object → {1} | Cyan |
{} | Empty Object | ○ Object → {} | Yellow |
() => "" | Function | ◉ Function → (anonymous)() | Magenta |
Download counts and popularity will appear here as the collector receives them.
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 17:41 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:fd3865ded8b0bab3c453db8abf4829d856ff4309f15ff0f6a8919519f30e9436