Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

es-map

es-shims105.9kMIT2.0.1

An ES-spec-compliant Map shim/polyfill/replacement that works as far down as ES3

Set, Map, collections, shim, polyfill, es-shim, API

readme

es-map Version Badge

github actions coverage License Downloads

npm badge

An ESnext spec-compliant Map shim/polyfill/replacement that works as far down as ES3.

This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec.

Getting started

npm install --save es-map

Usage/Examples

var map = new Map();
var obj = {};

map.set(1, 2).set(obj, 4);

map.get(obj); // 4
map.has(3); // false

Tests

Simply clone the repo, npm install, and run npm test

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v2.0.1 - 2024-12-11

Commits

  • [actions] split out node 10-20, and 20+ 27a8947
  • [Refactor] use call-bound directly, and has-proto e10dfa0
  • [Deps] update call-bind, es-abstract, get-intrinsic, has-symbols 478c7f1
  • [Refactor] use iterator.prototype 24f6021

v2.0.0 - 2024-09-21

Commits

  • [Breaking] update to es-shims API v3 fdcd654

v1.0.6 - 2024-09-17

Commits

  • [patch] remove useless ESM files ee92f83
  • [Refactor] update es-abstract usage to 2024 ccaddaa
  • [Deps] update call-bind, define-properties, es-abstract, es-set-tostringtag, get-intrinsic, globalthis, internal-slot, object.entries 694b2e6
  • [Dev Deps] update @es-shims/api, @ljharb/eslint-config, array.from, auto-changelog, npmignore, tape 33656d7
  • [meta] add missing engines.node cfdf4f7
  • [Tests] replace aud with npm audit 55ada5c
  • [Dev Deps] temporarily pin @es-shims/api 95b362d
  • [Dev Deps] add missing peer dep fd64369

v1.0.5 - 2023-09-07

Commits

  • [Deps] update es-abstract, object.entries 698df48
  • [Dev Deps] update @ljharb/eslint-config, array.from, aud, tape 55fa93c
  • [Deps] update define-properties, es-abstract, get-intrinsic, internal-slot bdcf9ac
  • [Dev Deps] update @es-shims/api, array.from 2bca409
  • [Fix] forEach: proper error message 73dd70d

v1.0.4 - 2023-01-19

Commits

  • [Deps] update es-abstract, es-get-iterator, es-set-tostringtag c0da2ac
  • [Dev Deps] update @ljharb/eslint-config, tape 86cd134

v1.0.3 - 2022-12-21

Commits

  • [Refactor] use es-set-tostringtag 06ddf53
  • [Deps] update es-abstract, internal-slot ab6fec0
  • [Dev Deps] update aud 03eab86

v1.0.2 - 2022-12-02

Commits

v1.0.1 - 2022-12-02

Commits

  • [readme] remove outdated notice 7aafa14

v1.0.0 - 2022-12-02

Commits

  • Tests a2decb5
  • Implementation b59e188
  • Initial commit f5cd986
  • [actions] reuse common workflows 7a29e1d
  • Add feature detection to shim.js c6b5773
  • [Tests] migrate tests to Github Actions 91dbaad
  • [meta] fix package.json indentation 9f05828
  • [Refactor] use internal-slot for internal slots c1c045f
  • [meta] use npmignore to autogenerate an npmignore file 42c98f4
  • [meta] do not publish github action workflow files d01c909
  • [Deps] update call-bind, es-abstract, es-get-iterator, get-intrinsic, globalthis, has-symbols, internal-slot, object.entries 165d4e3
  • Implement feature detection in polyfill.js fb8c88f
  • [Tests] re-enable eslint in the tests e2f7c0d
  • [actions] update workflows d17c47a
  • [Refactor] a bit of formatting 736c990
  • [Deps] update define-properties, es-abstract, get-intrinsic, globalthis, has-symbols, object.entries a175a68
  • [Refactor] remove ESM entry points 908cf0b
  • Use es-get-iterator 0e871e8
  • [Tests] add implementation tests 5039df8
  • [Tests] run nyc on all tests 1fcd52c
  • [Dev Deps] update eslint, @ljharb/eslint-config, array.from, safe-publish-latest, tape e0c1723
  • [actions] make workflows more consistent 3347993
  • [Dev Deps] update eslint, @ljharb/eslint-config, array.from, aud, auto-changelog, functions-have-names, tape 127c3f0
  • [actions] update codecov uploader 69242c8
  • [actions] update rebase action to use reusable workflow f1e5ece
  • [Tests] increase coverage 718abbb
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, functions-have-names, has-strict-mode 22f43cd
  • [readme] remove travis badge bc73775
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, tape 55fad2f
  • [Refactor] use call-bind and get-intrinsic where applicable a63a33c
  • [Fix] shim: ensure Map.call(new Map()) throws f8cd8f5
  • [readme] add github actions/codecov badges 83b43c7
  • [Dev Deps] update eslint, tape 5ebbdf5
  • Fix MapIterator.prototype cbe3cf2
  • [Dev Deps] update eslint 263274e
  • [Tests] fix tests in symbol-less node ef6bb92
  • [Fix] use for-each instead of foreach 6f2a0da
  • [Tests] add @es-shims/api a687f3e