Memoize functions with single argument of non-primitive argument.
Uses Map instance for cache, because it's keys can be non-primitive.
Use it when strict equality (===) for cache lookup is enough.
It suitable for functions with single argument of primitive type too.
example
constaddFlag = obj=> ({...obj, flag:true }); constmemoize = memoizeStrictSingle(addFlag)); consttest = {test:1}; memoize(test); // from addFlag call memoize({test:1}); // from addFlag call memoize(test); // from cache
Memoize functions with single argument of non-primitive argument. Uses Map instance for cache, because it's keys can be non-primitive. Use it when strict equality (===) for cache lookup is enough. It suitable for functions with single argument of primitive type too.