79572504

Date: 2025-04-14 06:47:13
Score: 0.5
Natty:
Report link

Here's a quick solution without needing Lodash or other libraries:

function areObjectsEqual(a: any, b: any): boolean {
  return (
    JSON.stringify(a, Object.keys(a).sort()) ===
    JSON.stringify(b, Object.keys(b).sort())
  );
}

This can also handle nested objects and different order of properties.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: hiteshspac