MCPcopy Create free account
hub / github.com/PaperDebugger/paperdebugger / cacheKey

Function cacheKey

webapp/_webapp/src/libs/code-plugin.ts:38–42  ·  view source on GitHub ↗
(code: string, lang: string, themes: Themes)

Source from the content-addressed store, hash-verified

36});
37
38function cacheKey(code: string, lang: string, themes: Themes) {
39 const prefix = code.slice(0, 100);
40 const suffix = code.length > 100 ? code.slice(-100) : "";
41 return `${lang}:${themes[0]}:${themes[1]}:${code.length}:${prefix}:${suffix}`;
42}
43
44function themeName(t: unknown): string {
45 if (typeof t === "string") return t;

Callers 1

highlightFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected