Skip to main content

CommonMemoize

Callable


  • Creates a simple memoizer. The memoized function does calculate its result exactly once and from that point on, uses the result stored in a local cache to speed up things.


    Parameters

    • func: T

      The function to memoize

    • argConvertors: (arg) => string[] = null

      A list of stringification functions for creating a memo, one for each function argument

    Returns MemoizedFunction<T>

    • The result of the memoized function