advanced-map-initialized
Map-like class with default values
Usage
import Initialized from 'advanced-map-initialized'
const map = new Initialized(Map, x => String(x))
map.get(0) // expect: '0'
map.set(0, 'zero')
map.get(0) // expect: 'zero'
Map-like class with default values
import Initialized from 'advanced-map-initialized'
const map = new Initialized(Map, x => String(x))
map.get(0) // expect: '0'
map.set(0, 'zero')
map.get(0) // expect: 'zero'
npm i advanced-map-initialized
1,082
0.0.4
MIT
4.25 kB
4