MCPcopy
hub / github.com/jesec/flood / memo

Function memo

client/src/javascript/styled-system/helpers.mjs:50–62  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

48
49// src/memo.ts
50var memo = (fn) => {
51 const cache = /* @__PURE__ */ new Map();
52 const get = (...args) => {
53 const key = JSON.stringify(args);
54 if (cache.has(key)) {
55 return cache.get(key);
56 }
57 const result = fn(...args);
58 cache.set(key, result);
59 return result;
60 };
61 return get;
62};
63
64// src/merge-props.ts
65var MERGE_OMIT = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);

Callers 15

svaFunction · 0.90
cvaFunction · 0.90
UploadSmall.tsxFile · 0.85
AddMini.tsxFile · 0.85
Comment.tsxFile · 0.85
Peers.tsxFile · 0.85
Radar.tsxFile · 0.85
ETA.tsxFile · 0.85
Chevron.tsxFile · 0.85
Inactive.tsxFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected