Skip to content

Memoizing functions with multiple arguments #2115

@willpiers

Description

@willpiers

The docs mention that, "By default, the first argument provided to the memoized function is used as the map cache key"

It would be great if the cache were multi-dimensional so _.memoize worked well out of the box with longer functions. i.e. functions with more arguments.

If there is a simple way to do this already, we can close. If this sounds useful I can look into submitting a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions