Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/googlearchive/WeakMap
Shim for ES6 WeakMap
https://github.com/googlearchive/WeakMap
Last synced: 3 months ago
JSON representation
Shim for ES6 WeakMap
- Host: GitHub
- URL: https://github.com/googlearchive/WeakMap
- Owner: googlearchive
- License: bsd-3-clause
- Archived: true
- Created: 2013-09-04T17:44:30.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-10-14T21:40:42.000Z (about 10 years ago)
- Last Synced: 2024-05-19T05:23:01.312Z (6 months ago)
- Language: JavaScript
- Size: 437 KB
- Stars: 46
- Watchers: 29
- Forks: 23
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- es6-tools - WeakMap shim
README
## DEPRECATED
This repo has moved to https://github.com/Polymer/webcomponentsjsWeakMap
=======Shim for ES6 WeakMap
## Shim Limitations
As ES5 Javascript does not have the ability to use weak references, the key-value association must be held strongly somwhere.
In order to hold the key "weakly", a key property of WeakMap, the value is added to key as a hidden, randomly named property. This strategy avoids the possible memory leak of having two arrays holding keys and values, but does mean that key cannot be a frozen object.