map-fns
Version:
<h1 align="center"> <code>map-fns</code> </h1>
16 lines (15 loc) • 571 B
TypeScript
import { AnyMap } from "../types";
/**
* Takes in two maps and returns true if they contain the same keys and the
* values behind their keys are shallowly equal. Returns false otherwise.
*
* This function can be useful to check if changes have occurred in any of
* the items in the map.
*
* The order that the maps are provided in does not matter.
*
* @param a First map to compare
* @param b Second map to compare
* @returns True if they are equal, False if they are not
*/
export default function areMapsShallowEqual<M extends AnyMap>(a: M, b: M): boolean;