decko
decko copied to clipboard
Don't think @memorize fit any case.
I saw you use first argument as key of cache. What if the first argument is an object, like this:
const a = {};
const b = {c: {}}
String(a) //"[object Object]"
String(b) //"[object Object]"
Besides, can you provide any benchmark tests? I don't think it fit any case.
It only supports primitive values. This is the reason it is fast.