— Ie obj1.prop1 was seen also in the same tree path as obj2.prop1 etc...
—
const stack = [{ obj1: obj1, obj2: obj2 }];
const seen = new Map();
seen.set(obj1, stack[0]);
—
if ((typeof value1) === "object") {
if (seen.has(value1)) continue _props;
stack.push({ obj1: value1, obj2: value2 });
seen.set(value1, objects);
continue _props;
}
Message permanent page
— I should add NaN support
— if (Number.isNaN(value1) !== Number.isNaN(value2)) return true;
— The lib also has regex support but that's a bit niche of a data type to be diffing
— I have used that before 🙈🙈🙈🙈