MCPcopy Index your code
hub / github.com/darkreader/darkreader / getCacheId

Function getCacheId

src/inject/dynamic-theme/modify-colors.ts:47–57  ·  view source on GitHub ↗
(rgb: RGBA, theme: Theme, poleA?: string, poleB?: string)

Source from the content-addressed store, hash-verified

45extendThemeCacheKeys(themeCacheKeys);
46
47function getCacheId(rgb: RGBA, theme: Theme, poleA?: string, poleB?: string): string {
48 let resultId = '';
49 rgbCacheKeys.forEach((key) => {
50 resultId += `${rgb[key]};`;
51 });
52 themeCacheKeys.forEach((key) => {
53 resultId += `${theme[key]};`;
54 });
55 resultId += `${poleA};${poleB}`;
56 return resultId;
57}
58
59function modifyColorWithCache(rgb: RGBA, theme: Theme, modifyHSL: HSLModifyFunction, poleColor?: string, anotherPoleColor?: string): string {
60 let fnCache: Map<string, string>;

Callers 1

modifyColorWithCacheFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected