Use WeakMap
Open
complexity:low
enhancement
plugin
- Dominant language
- JavaScript
- Stars
- 7.1k
- Forks
- 386
- PR merge metrics
- No merged PRs in 30d
Description
We are using in many cases some property directly on an object/function when we need to associate a value with that object. I think WeakMap support is good enough now that we can start using it and assume people will include a WeakMap polyfill for older browsers.
I think React is also using WeakMap.
## Todo
- [ ] use it in plugin-syntax-rule-value-function
- [x] use it in plugin-cache
- [x] update docs which refer required polyfils
- [x] search where else it could be used
Contributor guide
Assessment
This issue has not been assessed yet.