ez-map
一个基本的类似Map的实现。
安装
npm install ez-map
用法
var EzMap = require ( 'ez-map' )
var map = new EzMap ( [
[ 'foo' , 'bar' ]
] )
map . set ( 'baz' )
map . has ( 'foo' ) // => true
map . get ( 'baz' ) // => undefined
map . keys ( ) // => ['foo', 'baz']
map . values ( ) // => ['bar', undefined]
map . entries ( ) // => [['foo', 'bar'], ['baz', undefined]]
map . size ( ) // => 2
map . forEa
1