(target, thisArg, argsList)
| 634 | export const memoizeFn = fn => new Proxy(fn, { |
| 635 | cache: new Map(), |
| 636 | apply (target, thisArg, argsList) { |
| 637 | let cacheKey = stringToBase64(JSON.stringify(argsList)); |
| 638 | if(!this.cache.has(cacheKey)) { |
| 639 | this.cache.set(cacheKey, target.apply(thisArg, argsList)); |
| 640 | } |
| 641 | return this.cache.get(cacheKey); |
| 642 | } |
| 643 | }); |
| 644 | |
| 645 | export const memoizeTimeout = (fn, time) => new Proxy(fn, { |
nothing calls this directly
no test coverage detected