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

Function getCacheKey

packages/dev/s2-docs/scripts/generateMarkdownDocs.mjs:1283–1294  ·  view source on GitHub ↗
(name, file)

Source from the content-addressed store, hash-verified

1281}
1282
1283function getCacheKey(name, file) {
1284 if (file?.path) {
1285 if (file.path.includes(path.join('pages', 'react-aria', 'internationalized'))) {
1286 return `intl:${name}`;
1287 } else if (file.path.includes(path.join('pages', 'react-aria'))) {
1288 return `rac:${name}`;
1289 } else if (file.path.includes(path.join('pages', 's2'))) {
1290 return `s2:${name}`;
1291 }
1292 }
1293 return `default:${name}`;
1294}
1295
1296function getDocsImportSource(identifier, file) {
1297 return file?.data?.docsImports?.[identifier] || null;

Callers 6

resolveComponentPathFunction · 0.85
getComponentDescriptionFunction · 0.85
getFunctionExamplesFunction · 0.85
generatePropTableFunction · 0.85
generateInterfaceTableFunction · 0.85
generateClassAPITableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected