After attempting several implementations for deep comparison and copying for JSON-serializable objects, I\'ve noticed the fastest often are just:
function de
JavaScript does not guarantee the order of keys.
If they are entered in the same order, this approach would work most of the time, but it would not be reliable.
Also, it would return false for objects that were deeply equal, but whose keys were entered in a different order:
JSON.stringify({ a: 1, b: 2}) === "{"a":1,"b":2}"
JSON.stringify({ b: 2, a: 1}) === "{"b":2,"a":1}"