MCPcopy Index your code
hub / github.com/nodejs/node / get

Method get

deps/v8/tools/system-analyzer/view/helper.mjs:8–19  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

6 static _cache = new Map();
7
8 static get(name) {
9 let color = this._cache.get(name);
10 if (color !== undefined) return color;
11 const style = getComputedStyle(document.body);
12 color = style.getPropertyValue(`--${name}`);
13 if (color === undefined) {
14 throw new Error(`CSS color does not exist: ${name}`);
15 }
16 color = color.trim();
17 this._cache.set(name, color);
18 return color;
19 }
20
21 static reset() {
22 this._cache.clear();

Callers 15

backgroundColorMethod · 0.95
surfaceColorMethod · 0.95
primaryColorMethod · 0.95
secondaryColorMethod · 0.95
onSurfaceColorMethod · 0.95
onBackgroundColorMethod · 0.95
onPrimaryColorMethod · 0.95
onSecondaryColorMethod · 0.95
defaultColorMethod · 0.95
errorColorMethod · 0.95
mapBackgroundColorMethod · 0.95

Calls 2

getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected