MCPcopy
hub / github.com/npmx-dev/npmx.dev / selectCategory

Function selectCategory

app/composables/useFacetSelection.ts:217–222  ·  view source on GitHub ↗
(category: string)

Source from the content-addressed store, hash-verified

215
216 // Select all facets in a category
217 function selectCategory(category: string): void {
218 const categoryFacets = getFacetsInCategory(category)
219 const current = selectedFacetIds.value
220 const newFacets = [...new Set([...current, ...categoryFacets])]
221 selectedFacetIds.value = newFacets
222 }
223
224 // Deselect all facets in a category
225 function deselectCategory(category: string): void {

Callers 1

Calls 1

getFacetsInCategoryFunction · 0.85

Tested by

no test coverage detected