Some special Map implementations for ES6+
npm install maps![NPM Version][npm-url]


![Downloads][npm-url]
[npm-url]: https://npmjs.org/package/maps
Some special Map implementations for ES6+
``sh`
npm install maps
`js
import {HashMap} from 'maps'
class Entity {
constructor(id) {
this.id = id
}
[Symbol.for('hashCode')]() {
return this.id
}
Symbol.for('equals') {
return x instanceof Entity && x.id === this.id
}
}
const m = new HashMap
const e1 = new Entity(42)
const e2 = new Entity(42)
const test = {}
assert(e1 !== e2)
m.set(e1, test)
assert(m.get(e2) === test)
``
Same as standard Map.