![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
es6-native-map
Advanced tools
==============
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('').
FAQs
es6 compatible map using native store
We found that es6-native-map demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.