2.0.0 - 2021-xx-xx
- keep the key types when creating a map from an object
- for example, if a key is a number in an object it stays a number in the map
// object { id: 1, name: 'Supercharge' } // Map map.has(1) // true map.has('1') // false
- bump dependencies
- Require Node.js v14, drop support for Node.js v12
1.5.0 - 2021-09-13
- add
toArray()
method: converting the map to a JavaScript array containing arrays for each key-value-pair of this map Map.from()
method to create a new Map instance. ThisMap.from
method aligns with JavaScript’sArray.from
orObject.fromX
methods- add
pick(...keys)
method: creating a new map with the pickedkeys
- bump dependencies
- use
uvu
andc8
instead ofjest
for testing
1.4.0 - 2021-07-05
- create a map with entries from an existing object:
- you can now use
Map.of({ key: 'value' })
ornew Map({ key: 'value' })
- you can still use the key-value arrays for entries:
Map.of([['key', 'value']])
- you can now use
- add
isMissing(key)
method: determining whether the map is missing the givenkey
- add
toObject()
method: converting the map to a plain JavaScript object
- bump dependencies
- remove the
@supercharge/goodies
dependency - deprecated
missing(key)
method in favor ofisMissing(key)
1.3.0 - 2021-02-19
- add
missing(key)
method determining whether the map is missing the givenkey
- bump dependencies
1.2.0 - 2020-12-14
- add
contains(predicate)
method to determine whether the map satisfies the predicate function - add
includes(predicate)
method as an alias for thecontains
method
1.1.0 - 2020-12-14
- bump dependencies
- change
main
entrypoint inpackage.json
todist
folder - move test runner from
@hapi/lab
tojest
- move assertions from
@hapi/code
tojest
- remove
index.js
file which acted as a middleman to export fromdist
folder
1.0.0
release 🚀 🎉