MCPcopy Create free account
hub / github.com/adobe/react-spectrum / readBundledJson

Function readBundledJson

packages/dev/mcp/s2/src/s2-data.ts:17–29  ·  view source on GitHub ↗
(filename: string)

Source from the content-addressed store, hash-verified

15> | null = null;
16
17function readBundledJson(filename: string): any | null {
18 try {
19 // Go up from s2/src/ to dist/, then to data/
20 const p = path.resolve(__dirname, '..', '..', 'data', filename);
21 if (!fs.existsSync(p)) {
22 return null;
23 }
24 const txt = fs.readFileSync(p, 'utf8');
25 return JSON.parse(txt);
26 } catch {
27 return null;
28 }
29}
30
31export function listIconNames(): string[] {
32 if (iconIdCache) {

Callers 5

listIconNamesFunction · 0.85
listIllustrationNamesFunction · 0.85
loadIconAliasesFunction · 0.85
loadIllustrationAliasesFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected