Node.js objects inspector with color highlighting
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
__snapshots__
.editorconfig
.eslintignore
.eslintrc
.gitignore
.npmignore
.travis.yml
Contributing.md
License.md
Readme.md
index.d.ts
index.js
jsconfig.json
package-lock.json
package.json
test.js

Readme.md

q-i: Node.js objects inspector with color highlighting

npm Build Status

Useful for debugging big objects, like webpack configuration.

Features

  • Compact and readable output
  • No unnecessary quotes
  • Color highlighted
  • Collapses huge arrays and objects (more than 30 items by default)

Installation

npm install q-i

Usage

const { print, stringify } = require('q-i');

const obj = { a: { x: 41, y: { z: 42 } } };

print(obj);
console.log(stringify(obj));
/* =>
{
  a: {
    x: 41,
    y: {
      z: 42
    }
  }
}
*/

Options

print(obj, { maxItems: Infinity })
stringify(obj, { maxItems: Infinity })

maxItems (default: 30)

Collapse arrays with more than maxItems items and objects with more than maxItems keys.

Change log

The change log can be found on the Releases page.

Contributing

Everyone is welcome to contribute. Please take a moment to review the contributing guidelines.

Authors and license

Artem Sapegin and contributors.

MIT License, see the included License.md file.