Skip to content

Keys conflicts with inherited props #3

@YuriGor

Description

@YuriGor

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions