The title to process.
Processed title with cleaned formatting and normalized quotes.
export function processTitle(title: string): string {
// Try to get from cache first
const cacheWarmer = getCacheWarmer();
const cached = cacheWarmer.getNormalizedTitle(
title,
"processTitle",
processTitleDirect,
);
if (cached) {
console.debug(
`[TitleNormalizer] ✅ Cache HIT for processTitle: "${title}" → "${cached}"`,
);
return cached;
}
// Cache miss - compute directly
const result = processTitleDirect(title);
console.debug(
`[TitleNormalizer] ⚠️ Cache MISS for processTitle: "${title}" → "${result}"`,
);
return result;
}
Processes a title by removing parentheses and normalizing special characters. Handles Unicode quotes and common spacing issues. Checks cache first.