MCPcopy Index your code
hub / github.com/pgadmin-org/pgadmin4 / apply

Function apply

web/pgadmin/static/js/utils.js:636–642  ·  view source on GitHub ↗
(target, thisArg, argsList)

Source from the content-addressed store, hash-verified

634export 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
645export const memoizeTimeout = (fn, time) => new Proxy(fn, {

Callers

nothing calls this directly

Calls 4

stringToBase64Function · 0.85
setMethod · 0.45
getMethod · 0.45
deleteMethod · 0.45

Tested by

no test coverage detected