Skip to content

Documentation / @ripl/utilities / functionMemoize

Function: functionMemoize() ​

functionMemoize<TValue, TKey>(value, resolver?): MemoizedFunction<TValue, TKey>

Defined in: function.ts:59

Memoizes a function by caching results keyed by the resolver (defaults to the first argument).

Type Parameters ​

Type ParameterDefault type
TValue extends AnyFunction-
TKeyParameters<TValue>[0]

Parameters ​

ParameterType
valueTValue
resolverMemoizeResolver<TValue, TKey>

Returns ​

MemoizedFunction<TValue, TKey>