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

Function createCategories

packages/plugin-lighthouse/src/lib/binding.ts:134–145  ·  view source on GitHub ↗
({
  categories,
}: LighthouseOptions)

Source from the content-addressed store, hash-verified

132}
133
134function createCategories({
135 categories,
136}: LighthouseOptions): CategoryCodegenConfig[] {
137 return CATEGORIES.filter(({ slug }) => categories.includes(slug)).map(
138 ({ slug, title, description, group }) => ({
139 slug,
140 title,
141 description,
142 refsExpression: `lighthouseGroupRefs(${PLUGIN_VAR}, ${singleQuote(group)})`,
143 }),
144 );
145}
146
147function formatUrls([first, ...rest]: [string, ...string[]]): string {
148 if (rest.length === 0) {

Callers 1

binding.tsFile · 0.70

Calls 1

singleQuoteFunction · 0.90

Tested by

no test coverage detected