MCPcopy Create free account
hub / github.com/Nynxz/ComfyUI-IdeogramHelper / cacheStringFunction

Function cacheStringFunction

web/main.js:53–59  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

51 ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
52);
53const cacheStringFunction = (fn) => {
54 const cache = /* @__PURE__ */ Object.create(null);
55 return ((str) => {
56 const hit = cache[str];
57 return hit || (cache[str] = fn(str));
58 });
59};
60const camelizeRE = /-\w/g;
61const camelize = cacheStringFunction(
62 (str) => {

Callers 1

main.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected