Naturally Pacifist Marsupials
Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

weakmap-polyfill

2.0.2 • Public • Published

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

Install

npm i weakmap-polyfill

DownloadsWeekly Downloads

56,227

Version

2.0.2

License

MIT

Unpacked Size

9.09 kB

Total Files

5

Last publish

Collaborators

  • avatar