
Research
/Security News
npm Author Qix Compromised via Phishing Email in Major Supply Chain Attack
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
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 |
FAQs
Pretty string representation of object
We found that 0inspect demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.