weakmap-polyfill

WebJar for weakmap-polyfill

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

weakmap-polyfill
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

weakmap-polyfill
WebJar for weakmap-polyfill
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/polygonplanet/weakmap-polyfill

Download weakmap-polyfill

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/weakmap-polyfill/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>weakmap-polyfill</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/weakmap-polyfill/
implementation 'org.webjars.npm:weakmap-polyfill:2.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/weakmap-polyfill/
implementation ("org.webjars.npm:weakmap-polyfill:2.0.0")
'org.webjars.npm:weakmap-polyfill:jar:2.0.0'
<dependency org="org.webjars.npm" name="weakmap-polyfill" rev="2.0.0">
  <artifact name="weakmap-polyfill" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='weakmap-polyfill', version='2.0.0')
)
libraryDependencies += "org.webjars.npm" % "weakmap-polyfill" % "2.0.0"
[org.webjars.npm/weakmap-polyfill "2.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

weakmap-polyfill

NPM Version Build Status Bundle Size (minified) GitHub License

ECMAScript6 WeakMap polyfill.

Installation

npm

$ npm install --save weakmap-polyfill

Usage

Import or require weakmap-polyfill, then WeakMap will be defined in the global scope if native WeakMap is not supported in running environment.

node

require('weakmap-polyfill');
var weakMap = new WeakMap();

webpack etc.

import 'weakmap-polyfill';
const weakMap = new WeakMap();

browser (standalone)

<script src="weakmap-polyfill.min.js"></script>
<script>
var weakMap = new WeakMap();
</script>

Compatibility

This polyfill has following few limitations.

  • WeakMap iterable argument is not supported. (23.3.1.1 WeakMap ( [ iterable ] ))
  • Frozen and sealed objects are not supported.
  • The values held by a WeakMap can't be collected once the map itself is GCed, since the values here are tied to the keys. #4

License

MIT

Versions

Version
2.0.0