ez-map
A basic Map
-like implementation.
Installation
npm install ez-map
Usage
var EzMap =var map ='foo' 'bar'mapmap // => truemap // => undefinedmap // => ['foo', 'baz']map // => ['bar', undefined]map // => [['foo', 'bar'], ['baz', undefined]]mapsize // => 2mapmap // => truemap // => falsemapclear
Differences
.entries()
is the only way to get the entries..size()
(instead of.size
) to get the size of the entries..forEach()
has no parameter for passing the context.