MCPcopy Create free account
hub / github.com/triggerdotdev/jsonhero-web / colorForItemAtPath

Function colorForItemAtPath

app/utilities/colors.ts:31–37  ·  view source on GitHub ↗
(path: string, json: unknown)

Source from the content-addressed store, hash-verified

29}
30
31export function colorForItemAtPath(path: string, json: unknown): string {
32 const heroPath = new JSONHeroPath(path);
33 const value = heroPath.first(json);
34 const item = inferType(value);
35
36 return colorForTypeName(item.name);
37}

Callers 2

ColumnItemElementFunction · 0.90
ColumnElementFunction · 0.90

Calls 1

colorForTypeNameFunction · 0.85

Tested by

no test coverage detected