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

Function getStyleCache

lib/util.js:143–155  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

141}
142
143function getStyleCache() {
144 if (styleCache === undefined) {
145 styleCache = { __proto__: null };
146 const colors = inspect.colors;
147 for (const key of ObjectGetOwnPropertyNames(colors)) {
148 const codes = colors[key];
149 if (codes) {
150 styleCache[key] = codesToStyle(codes);
151 }
152 }
153 }
154 return styleCache;
155}
156
157/**
158 * Returns the cached ANSI escape sequences for a hex color.

Callers 1

styleTextFunction · 0.85

Calls 1

codesToStyleFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…