deepEqualsWith

Performs a deep equality check on two members, with support for custom equality function for primitive types.

Usage no npm install needed!

<script type="module">
  import deepEqualsWith from 'https://cdn.skypack.dev/deepEqualsWith';
</script>

README

deepEqualsWith

Performs a deep equality check on two members, with support for custom equality function for primitive types.

Usage:

var isEqual = deepEqualWith(a, b, primitiveEquals)

where a, b are things we're testing equality for, and primitiveEquals is an optional hash from primitiveType => equalityFn with the shape:

primitiveEquals = {
  string: (a, b) => boolean,
  number: (a, b) => boolean,
  ...
}