title: Where I can find source code of deepEqual() function, that returns true in specific arguments?
body: <p>NodeJS function assert.deepEqual() works as assert.equal(), but can compare arrays, maps, sets and objects recursively.</p>
  <p>For example,</p>
  <pre><code>let m1 = new Map([[[1,2],[3,4]],[[3,4],[1,2]]]);
  console.log(m1);
  // =&gt; Map(2) { [ 1, 2 ] =&gt; [ 3, 4 ], [ 3, 4 ] =&gt; [ 1, 2 ] }
  
  let m2 = new Map([[[3,4],[1,2]],[[1,2],[3,4]]]);
  console.log(m2);
  // =&gt; Map(2) { [ 3, 4 ] =&gt; [ 1, 2 ], [ 1, 2 ] =&gt; [ 3, 4 ] }
  
  // Where can I find this function? 
  deepEqual(m1,m2) // =&gt; true
  
  let s1 = new Set([[1,2],[3,4]]);
  console.log(s1);
  // =&gt; Set(2) { [ 1, 2 ], [ 3, 4 ] }
  
  let s2 = new Set([[3,4],[1,2]]);
  console.log(s2);
  // =&gt; Set(2) { [ 3, 4 ], [ 1, 2 ] }
  
  // Where can I find this function? 
  deepEqual(s1,s2) // =&gt; true
  </code></pre>
  <p>The above examples do not work with the standard <a href="https://nodejs.org/api/assert.html#assert_assert_deepequal_actual_expected_message" rel="nofollow noreferrer">assert.deepEqual</a> function of the nodejs module.</p>
  <p>Ideally, the function should recursively check the equivalence of arguments. But because of the broken order of values, the function does not find their equivalence.</p>
  <p>I found this in documentation</p>
  <p><strong><a href="https://nodejs.org/api/assert.html#assert_comparison_details_1" rel="nofollow noreferrer">Comparison details</a></strong></p>
  <ul>
  <li>Primitive values are compared using the SameValue Comparison, used by Object.is().</li>
  <li>Type tags of objects should be the same.</li>
  <li>Prototype of objects are compared using the Strict Equality Comparison.</li>
  <li><strong>Only enumerable &quot;own&quot; properties are considered.</strong></li>
  <li>Error names and messages are always compared, even if these are not enumerable properties.</li>
  <li>Enumerable own Symbol properties are compared as well.</li>
  <li>Object wrappers are compared both as objects and unwrapped values.</li>
  <li>Object properties are compared unordered.</li>
  <li><strong>Map keys and Set items are compared unordered.</strong></li>
  <li>Recursion stops when both sides differ or both sides encounter a circular reference.</li>
  <li>WeakMap and WeakSet comparison does not rely on their values. See below for further details.</li>
  </ul>
  <p>This implementation is not suitable for looking for equivalence in such situations.</p>