Hi, this is a feature request, PR is incoming soon.
I suggest to add dict option to make lib produce cache objects without prototype, so you can safely use cache object for storing/checking arbitrary keys without risk of conflicts (e.g. prop 'constructor' will be function in empty cache)
Here is some article about topic problem for reference: https://2ality.com/2013/10/dict-pattern.html
I suggest this feature to be optional, and keep using normal objects by default to keep backward compat.
Hi, this is a feature request, PR is incoming soon.
I suggest to add
dictoption to make lib produce cache objects without prototype, so you can safely use cache object for storing/checking arbitrary keys without risk of conflicts (e.g. prop 'constructor' will be function in empty cache)Here is some article about topic problem for reference: https://2ality.com/2013/10/dict-pattern.html
I suggest this feature to be optional, and keep using normal objects by default to keep backward compat.