MCPcopy Index your code
hub / github.com/adobe/react-spectrum / getCurrentPage

Function getCurrentPage

packages/dev/s2-docs/src/getPages.ts:72–88  ·  view source on GitHub ↗
(page: Page)

Source from the content-addressed store, hash-verified

70}
71
72export function getCurrentPage(page: Page): Page {
73 // Remove .html
74 let name = page.name.slice(0, -5);
75
76 // Prepend current build's library
77 let library = process.env.LIBRARY;
78 if (library) {
79 name = `${library}/${name}`;
80 }
81
82 return {
83 name,
84 url: getUrl(name),
85 exports: page.exports,
86 tableOfContents: page.tableOfContents
87 };
88}
89
90// console.log(await getPages());

Callers 2

LayoutFunction · 0.90
RouterWrapperServerFunction · 0.90

Calls 2

getUrlFunction · 0.85
sliceMethod · 0.80

Tested by

no test coverage detected