Extremely thorough structural equality test of questionable usefulness.
little brother. It doesn't care about encapsulation or data-hiding -- it finds
all the properties on your objects and makes sure that any two objects are
exactly the same by examining their property descriptors directly. Arguably
useful for comparing objects that have been created using
magic, and can correctly test some objects that would lead to stack explosions
when used with
deeper or other more straightforward deep equality testers.
I'd love to know about any situations where this module turns out to be
deeper, also comes with shims for use with my three favorite
See the usage instructions for details on how to enable the shims.
npm install deepest
// vanillavar deepEqual = require'deepest'if !deepEqualobj1 obj2 console.log"yay! diversity!";// to install the shim against require('assert').deepEqualrequire'deepest'patchAssert;// to patch Chai's eql / deep.equal / et alrequire'deepest'patchChai;// to patch node-tap's ridiculous array of synonyms for deepEqualrequire'deepest'patchTap;
deeper's caveats apply here as well. Also, I'm not sure this module is
a good idea.