@mincho-js/debug-log
v1.0.5
Published
A utility library for easier console debugging and comparison of JavaScript object values
Downloads
10
Readme
@mincho-js/debug-log
This was created to make console debugging easier when you often need to compare JavaScript object values.
Install
npm install @mincho-js/debug-log
# or
yarn add @mincho-js/debug-log
# or
pnpm install @mincho-js/debug-log
API
debugLog
The count is incremented automatically with each call.
debugLog();
console.log("test");
debugLog("with title debugLog");
console.log("test2");
jsonLog
Output JSON with the debug log.
If you just want to print JSON purely, use jsonPrint
.
jsonLog({ key1: true, key2: 1, key3: null, key4: "string" });
jsonLog("with title jsonLog", { others: undefined });
jsonExpect
Compare the JSON and show the differences.
jsonExpect({ a: 1 }, { a: 2 });
jsonExpect("with title jsonExpect", { b: 1 }, { c: "1" });