4.0.1 • Published 7 years ago

es6-native-map v4.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

es6-native-map

==============

This Node.js module provides an interface to a native hashmap data structure with the ES6 Map api. This is significantly faster than the built-in Map, but loses the order of key/value inserts.

As of 2.0.0, es6-native-map requires node.js 0.12 or later. If you are running node.js 0.10, stick with the 1.x.x line.

As of 4.0.0, es6-native-map actually implements @@iterator correctly, so you can use all the iterable functions and operators.

To install, simply:

npm install es6-native-map

To use:

var Map = require('es6-native-map');

var map = new Map();
map.set('key', {value: 'value'});
map.set('something', 'else');

console.log('There are', map.size, 'item(s) in the map');

iterator = map.entries();
item = iterator.next();
while (!item.done) {
    console.log(item.value[0], '=', item.value[1]);
    item = iterator.next();
}

See the official ES6 Map documentation

This package is made possible because of Grokker, one of the best places to work. If you are a JS developer looking for a new gig, send me an email at ['chad', String.fromCharCode(64), 'grokker', String.fromCharCode(0x2e), 'com'].join('').

4.0.1

7 years ago

3.5.1

8 years ago

3.5.0

8 years ago

3.4.1

8 years ago

3.4.0

8 years ago

3.3.3

8 years ago

3.3.2

8 years ago

3.1.0

9 years ago

3.0.1

9 years ago

3.0.0

9 years ago

2.0.7

9 years ago

2.0.5

9 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.9.2

10 years ago

0.9.1

10 years ago

0.9.0

10 years ago

0.8.2

10 years ago

0.8.1

10 years ago

0.8.0

10 years ago

0.7.1

10 years ago

0.7.0

10 years ago

0.6.0

10 years ago

0.5.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago