MCPcopy Create free account
hub / github.com/code-pushup/cli / lighthouseCategories

Function lighthouseCategories

packages/plugin-lighthouse/src/lib/categories.ts:33–44  ·  view source on GitHub ↗
(
  plugin: Pick<PluginConfig, 'groups' | 'context'>,
  categories?: CategoryConfig[],
)

Source from the content-addressed store, hash-verified

31 * ];
32 */
33export function lighthouseCategories(
34 plugin: Pick<PluginConfig, 'groups' | 'context'>,
35 categories?: CategoryConfig[],
36): CategoryConfig[] {
37 if (!plugin.groups || plugin.groups.length === 0) {
38 return categories ?? [];
39 }
40 if (!categories) {
41 return createCategories(plugin);
42 }
43 return expandCategories(plugin, categories);
44}
45
46/**
47 * @deprecated

Callers 1

Calls 2

createCategoriesFunction · 0.70
expandCategoriesFunction · 0.70

Tested by

no test coverage detected