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

1.0.0 • Public • Published

Loose Map

ES6 Map with loose type checking

Install

yarn add @mothepro/loose-map

How to Use

Just like a normal ES6 Map, however object identical literals will match each other.

  const map = new LooseMap

  map
    .add({ hello: 'world' }, 123)
    .add({ hello: 'world' }, 321)

  map.size == 1
  map.has({ hello: 'world' }) == true
  map.get({ hello: 'world' }) == 321

Readme

Keywords

none

Package Sidebar

Install

npm i @mothepro/loose-map

Weekly Downloads

1

Version

1.0.0

License

Apache-2.0

Unpacked Size

29.4 kB

Total Files

19

Last publish

Collaborators

  • mothepro