@mehasoft/dd
is a debugging tool for Node.js, similar to Laravel's dd()
function. It provides colorful and detailed console output to make error detection easier.
To add it to your Node.js project:
npm i -D @mehasoft/dd
📌 Usage (Es6)
import { dd } from "@mehasoft/dd";
const user = {
name: "Mevlüt",
age: 22,
skills: ["JavaScript", "Node.js", "Laravel"]
};
dd(user); // Displays a formatted, colorized output and halts the process
📌 Usage (CommonJS)
const { dd } = require("@mehasoft/dd");
const user = {
name: "Mevlüt",
age: 22,
skills: ["JavaScript", "Node.js", "Laravel"]
};
dd(user); // Displays a formatted, colorized output and halts the process
Alternatively, you can pass multiple arguments:
dd("An error occurred!", { errorCode: 500 }, ["Error details"]);
You will see a colorized and formatted output in the console:
🛑 DEBUG DUMP
{
name: 'Mevlüt',
age: 22,
skills: [ 'JavaScript', 'Node.js', 'Laravel' ]
}
This project is licensed under the MIT License. For more details, please check the LICENSE
file.