Function memoization for arbitrary argument counts. Returns augmented function, which uses JSON.stringify() to obtain (and store) memoized result for given args. Supports generics for up to 4 args (otherwise untyped).
Important: If the given args cannot be stringified, the user function will ALWAYS be called (without caching result).
Function memoization for arbitrary argument counts. Returns augmented function, which uses
JSON.stringify()
to obtain (and store) memoized result for given args. Supports generics for up to 4 args (otherwise untyped).Important: If the given args cannot be stringified, the user function will ALWAYS be called (without caching result).