Comment on Why I Like Using Maps (and WeakMaps) for Handling DOM NodesparentComments−panzerboiler3yBecause a Map is an Object. It has properties and methods. The only way to provide a safe and clean namespace for your keys is to provide an explicit API. It also supports keys that can be not only strings or symbols.
Comments
Because a Map is an Object. It has properties and methods. The only way to provide a safe and clean namespace for your keys is to provide an explicit API. It also supports keys that can be not only strings or symbols.