- Notifications
You must be signed in to change notification settings - Fork0
An essential WeakMap polyfill for legacy browsers.
License
NotificationsYou must be signed in to change notification settings
ungap/weakmap
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
An essentialWeakMap polyfill for legacy browsers (IE < 11).
- CDN viahttps://unpkg.com/@ungap/weakmap
- ESM via
import WeakMap from '@ungap/weakmap' - CJS via
const WeakMap = require('@ungap/weakmap')
Compatible down to IE9, works well with ES5 shim upfront in IE8 (and maybe lower too).
If you need this module to work in IE < 11 too with frozen objects, or template literals frozen via Babel transpilation, you need to either nullifyObject.freeze and others via something like<script>this.WeakMap||(Object.freeze=Object);</script> on top of your pages, or you can nullify only template literals through:
<script>this.WeakMap||(function(O,f){f=O.freeze||O;O.freeze=function(o){return'raw'ino?o:f(o)}}(Object));</script>
About
An essential WeakMap polyfill for legacy browsers.
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.