MCPcopy Create free account
hub / github.com/donghaxkim/react-rewrite / flattenScale

Function flattenScale

packages/cli/src/tailwind-resolver.ts:499–508  ·  view source on GitHub ↗
(scale: Record<string, unknown> | undefined)

Source from the content-addressed store, hash-verified

497 const theme = resolved.theme as Record<string, Record<string, unknown>>;
498
499 const flattenScale = (scale: Record<string, unknown> | undefined): Record<string, string> => {
500 const result: Record<string, string> = {};
501 if (!scale) return result;
502 for (const [key, value] of Object.entries(scale)) {
503 if (typeof value === "string") {
504 result[key] = value;
505 }
506 }
507 return result;
508 };
509
510 // Flatten colors (may be nested like { slate: { 500: "#..." } })
511 const flattenColors = (colors: Record<string, unknown> | undefined): Record<string, string> => {

Callers 1

resolveV3ConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected