Memoizes a function, caching results based on arguments.
Works best with pure functions with small input spaces.
The cache key is the JSON form of the arguments, so objects and arrays
match by content, not identity. undefined, NaN, Infinity,
-Infinity and BigInt values get their own keys. Functions and symbols
match by identity. -0 and 0 share a key. Circular arguments throw a
TypeError; Map and Set arguments are not told apart by content.
A key that contains the literal "\u0000mochila" property can collide.
Memoizes a function, caching results based on arguments. Works best with pure functions with small input spaces.
The cache key is the JSON form of the arguments, so objects and arrays match by content, not identity.
undefined,NaN,Infinity,-Infinityand BigInt values get their own keys. Functions and symbols match by identity.-0and0share a key. Circular arguments throw aTypeError;MapandSetarguments are not told apart by content. A key that contains the literal"\u0000mochila"property can collide.Example