cssinjs / cssinjs/jss

Use WeakMap

Open
#880 6 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.