@ekim088/toolkit
    Preparing search index...

    Function memoizeOne

    • Returns a memoized function that caches the last result of a function call. The cached result is returned if the function arguments remain the same. Only a single result is ever cached.

      Type Parameters

      • T extends (...args: any) => unknown

      Parameters

      • fn: T

        The function to memoize.

      • OptionalequalityFn: EqualityFn<T>

        A custom function to check equality between the current arguments and the cached arguments. Arguments are considered equal if the equality function returns true.

      Returns MemoizedFn<T>

      The memoized function.