MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / getAllFeatureSlugs

Function getAllFeatureSlugs

apps/public/src/lib/features.ts:122–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

120}
121
122export async function getAllFeatureSlugs(): Promise<string[]> {
123 try {
124 const files = readdirSync(contentDir);
125 return files
126 .filter((file) => file.endsWith('.json'))
127 .map((file) => file.replace('.json', ''));
128 } catch (error) {
129 console.error('Error reading features directory:', error);
130 return [];
131 }
132}
133
134export async function loadFeatureSource(): Promise<FeatureData[]> {
135 const slugs = await getAllFeatureSlugs();

Callers 2

generateStaticParamsFunction · 0.90
loadFeatureSourceFunction · 0.85

Calls 3

replaceMethod · 0.80
mapMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected