isMapEqual()function
isMapEqual(left: ImmutableMap, right: T, recursor: Match = isEqual): left is T
| Param | Type | |
|---|---|---|
left | ImmutableMap | The map to check and narrow. required |
right | T | The map to compare against. required |
recursor | Match | Function that checks each value of the map (defaults to isEqual() for strict equality; pass isDeepEqual() for deep equality). Defaults to isEqual |
| Return | |
|---|---|
left is T | true if both maps have the same keys and matching values. |
Are two maps equal based on their items?
Examples
isMapEqual(new Map([["a", 1]]), new Map([["a", 1]])) // true