(t)
| 288 | // Lowercase, strip punctuation, collapse whitespace — so minor title |
| 289 | // differences between a podcast feed and its YouTube upload don't block a match. |
| 290 | function 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 |
no outgoing calls
no test coverage detected