JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 620414
  • Score
    100M100P100Q258808F
  • License MIT

ECMAScript6 WeakMap polyfill

Package Exports

  • weakmap-polyfill

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (weakmap-polyfill) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

weakmap-polyfill

NPM Version Build Status Bundle Size (minified) GitHub License

ECMAScript6 WeakMap polyfill.

Installation

npm

$ npm install 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>

License

MIT