immutable-es6-map
v1.0.2
Published
Immutable map implemementation maximally compatible with es6 map
Downloads
17
Readme
Immutable Map
Immutable map object maximally compatible with (and backed by) an ES6 Map
Summary
const TEST_DATA = ;
let map1 = new ImmutableMap([
[ 'foo', 'bar' ],
[ 'dinkum', 'thinkum' ],
[ 'wyoming', 'knot' ],
[ 'dick', 'seaton' ]
]);
// chain update operations
let map2 = map1.set('hercules', 'morse').delete('dinkum').set('dick','grayson');
// map1 is unchanged
The map API is the same as for the ES6 map with two notable exceptions; the clear() method is missing and the delete(key) operation returns a copy of the map (with item removed) rather than a true/false indicator of whether the remove was susccessful. The set operation also returns a copy of the map operated on (with the update applied) rather than a reference to the original map.
For the latest API documentation see The Software Plumbers Site
