MCPcopy
hub / github.com/midudev/libros-programacion-gratis / createSearchableCatalog

Function createSearchableCatalog

web/src/lib/contribution.ts:49–54  ·  view source on GitHub ↗
(catalog: CatalogEntry[])

Source from the content-addressed store, hash-verified

47export const isSupportedUrl = (value: string) => normalizeUrl(value) !== '';
48
49export const createSearchableCatalog = (catalog: CatalogEntry[]): SearchableCatalogEntry[] =>
50 catalog.map((entry) => ({
51 ...entry,
52 normalizedHref: normalizeUrl(entry.href),
53 normalizedTitle: normalizeText(entry.title),
54 }));
55
56export const findPotentialDuplicates = (
57 proposal: Pick<ContributionForm, 'url' | 'title'>,

Callers

nothing calls this directly

Calls 2

normalizeUrlFunction · 0.85
normalizeTextFunction · 0.85

Tested by

no test coverage detected