79553441

Date: 2025-04-03 16:06:29
Score: 1.5
Natty:
Report link

This library supports map/set comparison operations including .equals: https://github.com/adamhamlin/deep-equality-data-structures?tab=readme-ov-file#comparable-interface

const map1 = new DeepMap([[1, "dog"], [2, "cat"]]);
const map2 = new DeepMap([[2, "cat"], [1, "dog"]]);
const map3 = new DeepMap([[1, "dog"], [2, "laser-cat"]]);

map1.equals(map2); // true
map1.equals(map3); // false

It also uses deep/structural equality for keys and values.

Full disclosure: I am the library author

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: ishovelwell