MCPcopy Create free account
hub / github.com/anders-swanson/oracle-database-code-samples / getStats

Function getStats

website/src/lib/catalog.ts:293–303  ·  view source on GitHub ↗
(items: SampleSummary[])

Source from the content-addressed store, hash-verified

291}
292
293export function getStats(items: SampleSummary[]) {
294 const featuredCount = items.filter((sample) => sample.featured).length;
295 const languageCount = new Set(items.map((sample) => sample.language)).size;
296
297 return {
298 total: items.length,
299 featured: featuredCount,
300 languages: languageCount,
301 features: catalogIndex.f
302 };
303}
304
305export function parseQueryList(value: unknown) {
306 if (typeof value !== 'string' || value.trim().length === 0) {

Callers 1

catalog.test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected