@rikitonoto/map-equal
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Description

This library allows you to compare the Map instances. but it is shallow compared, so can't compare nested objects.

Installation

npm install map-equal --save

Usage

import { mapEqual } from "map-equal";
mapEqual(new Map([[1,0]]), new Map([[1,0]])); // => true
mapEqual(new Map([[1,0]]), new Map([[1,1]])); // => false
mapEqual(new Map([[1,0]]), new Map([[2,0]])); // => false
mapEqual(new Map([["1",0]]), new Map([[1,0]])); // => false
mapEqual(new Map([[1,{}]]), new Map([[1,{}]])); // => false

/@rikitonoto/map-equal/

    Package Sidebar

    Install

    npm i @rikitonoto/map-equal

    Weekly Downloads

    1

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    8.21 kB

    Total Files

    9

    Last publish

    Collaborators

    • rikitonoto