Created
June 12, 2022 14:15
-
-
Save xettri/78ddcfed122dee960720466f61b43451 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { deepEqual } = require('assert'); | |
Object.defineProperty(Object.prototype, 'deepEqual', { | |
writable: false, | |
enumerable: false, | |
configurable: false, | |
value: (a, b) => deepEqual(a, b), | |
}) | |
// Usage: | |
Object.deepEqual({ a: 1 }, { a: 1 }); // true | |
Object.deepEqual({ a: 1 }, { a: 2 }); // false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment