MCPcopy
hub / github.com/dataease/dataease / get

Function get

core/core-frontend/src/hooks/web/useCache.ts:27–48  ·  view source on GitHub ↗
(target, prop, receiver)

Source from the content-addressed store, hash-verified

25
26 const wrappedCache = new Proxy(originalCache, {
27 get(target, prop, receiver) {
28 const originalMethod = target[prop as keyof typeof target]
29
30 if (typeof originalMethod !== 'function') {
31 return originalMethod
32 }
33
34 if (methodsNeedKeyPrefix.has(prop as string)) {
35 return function (this: any, key: string, ...args: any[]) {
36 const processedKey = processKey(key)
37 return originalMethod.call(target, processedKey, ...args)
38 }
39 }
40
41 if (prop === 'set') {
42 return function (this: any, key: string, value: any, ...args: any[]) {
43 const processedKey = processKey(key)
44 return originalMethod.call(target, processedKey, value, ...args)
45 }
46 }
47 return originalMethod.bind(target)
48 }
49 })
50
51 return {

Callers 5

setChangePropertiesFunction · 0.85
configTooltipMethod · 0.85
getTreeCustomCalcResultFunction · 0.85
getGridCustomCalcResultFunction · 0.85
processFieldValuesFunction · 0.85

Calls 2

processKeyFunction · 0.85
bindMethod · 0.65

Tested by

no test coverage detected