Map object returns true regardless of key entries
See original GitHub issueCopied from node console:
> const equal = require('fast-deep-equal');
undefined
> const mapA = new Map();
undefined
> const mapB = new Map();
undefined
> equal(mapA, mapB)
true
> mapA.set('a', 1);
Map { 'a' => 1 }
> equal(mapA, mapB)
true
My guess is because they both have the same key properties
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:6 (3 by maintainers)
Top Results From Across the Web
What are the reasons why Map.get(Object key) is not (fully) ...
When a map returns key values, it conserves as much type information as it can, by using the type parameter. Share.
Read more >Map and Set
map.has(key ) – returns true if the key exists, false otherwise. map.delete(key) – removes the element (the key/value pair) by the key. map.clear ......
Read more >When to Use Map instead of Plain JavaScript Object
Map's main benefits over plain object is allowing keys of any type and any name. ... booleansMap uses booleans true and false as...
Read more >Map - JavaScript - MDN Web Docs - Mozilla
The keys in Map are ordered in a simple, straightforward way: A Map object iterates entries, keys, and values in the order of...
Read more >Java Map
This Map can now only accept String objects for keys, and MyObject instances for values. You can then access and iterate keys and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The same is true for Sets:
released in beta