console.diff(...)
Add to Chrome
Opens the official Chrome Web Store
About console.diff(...)
Compare objects in memory with console.diff(old, new) devtools function
An extension for developers that enhances the console API by incorporating the ability to compare objects and adds a JSDiff tab (parallel to Elements, Network panels) within your dev-tools for viewing the results.
Motivation:
Track object mutations during runtime and/or while debugging with intention to find expected or unexpected changes.
Note: this extension utilises content scripts, so after immediate installation or an update, make sure to refresh the inspected tab before using its functionality.
API:
// compare left and right arguments
console.diff(
{ a: 1, b: 1, c: 3 },
{ a: 1, b: 2, d: 3 }
);
// with a single argument behaves the same as `console.diffPush`
console.diff(Date.now());
// shifts sides - previous right side becomes left, new value becomes right
console.diffPush(Date.now());
// update left side only
console.diffLeft(Date.now());
// update right side only
console.diffRight(Date.now());
Read more at: https://github.com/zendive/jsdiff
Motivation:
Track object mutations during runtime and/or while debugging with intention to find expected or unexpected changes.
Note: this extension utilises content scripts, so after immediate installation or an update, make sure to refresh the inspected tab before using its functionality.
API:
// compare left and right arguments
console.diff(
{ a: 1, b: 1, c: 3 },
{ a: 1, b: 2, d: 3 }
);
// with a single argument behaves the same as `console.diffPush`
console.diff(Date.now());
// shifts sides - previous right side becomes left, new value becomes right
console.diffPush(Date.now());
// update left side only
console.diffLeft(Date.now());
// update right side only
console.diffRight(Date.now());
Read more at: https://github.com/zendive/jsdiff
Permissions & site access
Can read and change your data on all websites.
This is normal for ad blockers, password managers and translators, but means the extension sees every page you open.
Other permissions:
storage
Read from the extension's manifest. Chrome shows the same warnings before installation.