MCPcopy
hub / github.com/zarazhangrui/follow-builders / normalizeTitle

Function normalizeTitle

scripts/generate-feed.js:290–296  ·  view source on GitHub ↗
(t)

Source from the content-addressed store, hash-verified

288// Lowercase, strip punctuation, collapse whitespace — so minor title
289// differences between a podcast feed and its YouTube upload don't block a match.
290function normalizeTitle(t) {
291 return t
292 .toLowerCase()
293 .replace(/[^a-z0-9\s]/g, " ")
294 .replace(/\s+/g, " ")
295 .trim();
296}
297
298// Finds the YouTube video whose title best matches the podcast episode title.
299// Uses substring match first, then token overlap (>=50% of episode's content

Callers 1

findYouTubeEpisodeUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected