dumper.js

A better and pretty variable inspector for your Node.js applications

  • Owner: ziishaned/dumper.js
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

Installation

npm install --save-dev dumper.js
# or you may use yarn
yarn add dumper.js --dev

Usage

dd() Dump and Die

Calling dd() prints the output and kills the process

const { dd } = require('dumper.js');

const users = [
    { user: 'barney', age: 36, active: true, createdAt: new Date(), getAge: () => this.age },
    { user: 'fred', age: 40, active: false, createdAt: new Date(), getAge: () => this.age },
    { user: 'pebbles', age: 1, active: true, createdAt: new Date(), getAge: () => this.age }
];

dd(users);

// Above variable will be printed
console.log('this will never be called');

Will output below result and kill the process. Demo

dd

dump() Dump and Continue

Calling dump() prints the output and continues with the processing

const { dump } = require('dumper.js');

const users = [
    { user: 'barney', age: 36, active: true, createdAt: new Date(), getAge: () => this.age },
    { user: 'fred', age: 40, active: false, createdAt: new Date(), getAge: () => this.age },
    { user: 'pebbles', age: 1, active: true, createdAt: new Date(), getAge: () => this.age }
];

dump(users);

// Above variable will be printed and the process will continue
console.log('this will be called');

Will output below result and continue processing. Demo

dump

Contributions

Feel free to submit pull requests, create issues or spread the word.

License

MIT © Zeeshan Ahmad

Main metrics

Overview
Name With Ownerziishaned/dumper.js
Primary LanguageJavaScript
Program languageMakefile (Language Count: 2)
Platform
License:MIT License
所有者活动
Created At2018-08-05 17:16:26
Pushed At2025-02-05 18:52:56
Last Commit At2025-02-05 13:52:56
Release Count5
Last Release Name1.3.1 (Posted on )
First Release Name0.0.1 (Posted on )
用户参与
Stargazers Count2.8k
Watchers Count23
Fork Count75
Commits Count154
Has Issues Enabled
Issues Count6
Issue Open Count3
Pull Requests Count14
Pull Requests Open Count6
Pull Requests Close Count27
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private