UNPKG

@beamimpact/web-sdk

Version:

The Beam SDK enables brands to connect with their customers over shared values, not transactional discounts, to build stronger loyalty. Our integration achieves this by allowing customers to (a) choose a nonprofit where the brand will donate part of their

18 lines (16 loc) 823 B
type Func<T extends any[], R> = (...args: T) => R; /** * Takes a function and returns a new memoized function. * If the same arguments are passed to the memoized function, it will return the previously computed result. * This is a "memoize once" function meaning it only compares the previous and current arguments, not historic values. * Results that throw errors or return rejected Promises are not cached. * * @param {Function} fn - The function to be memoized. * @param {(value: any) => boolean} [isEqual]- The equality function used to compare arguments. * @returns {Function} - The memoized function. * @param func */ declare function memoizeLast<T extends any[], R>(func: Func<T, R>, { isEqual }?: { isEqual?: ((value: any, other: any) => boolean) | undefined; }): Func<T, R>; export { memoizeLast };