memoize

Function

Wrap a function into a memoized version of itself. Multiple calls for the same function will return the same memoized function - thus enabling a shared cache of results. const memoizedItemSearch = memoize(searchItems);

Wrap a function into a memoized version of itself. Multiple calls for the same function will return the same memoized function - thus enabling a shared cache of results. const memoizedItemSearch = memoize(searchItems);

  • memoize(fn: function(args: unknown[]) : ) : any

Parameters

Parameter Type Default Notes
fn Required function(args: unknown[]) :

Returns

any

Function defined in common/src/utils/memoize.ts:23