Function memoize

  • Creates a function that memoizes the result of func. If resolver is provided, it determines the cache key for storing the result based on the arguments provided to the memoized function. By default, the first argument provided to the memoized function is used as the map cache key.


    Returns the new memoized function.

    Type Parameters

    • T


    • func: Function<T>

      The function to have its output memoized.

    • Optional resolver: Function<any>

      The function to resolve the cache key.

    Returns Function<T>

Generated using TypeDoc