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

Function deselectCategory

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

Source from the content-addressed store, hash-verified

223
224 // Deselect all facets in a category
225 function deselectCategory(category: string): void {
226 const categoryFacets = getFacetsInCategory(category)
227 const remaining = selectedFacetIds.value.filter(f => !categoryFacets.includes(f))
228 // Don't allow deselecting all facets
229 if (remaining.length > 0) {
230 selectedFacetIds.value = remaining
231 }
232 }
233
234 // Select all facets globally
235 function selectAll(): void {

Callers 1

Calls 1

getFacetsInCategoryFunction · 0.85

Tested by

no test coverage detected