3 changed files with 11 additions and 4 deletions
@ -0,0 +1,7 @@
@@ -0,0 +1,7 @@
|
||||
function normalizeTitle(title: string): string { |
||||
return title.trim().toLowerCase().replace(/[\'\"\:]/g, "").replace(/[^a-zA-Z0-9]+/g, "_"); |
||||
} |
||||
|
||||
export function compareTitle(a: string, b: string): boolean { |
||||
return normalizeTitle(a) === normalizeTitle(b); |
||||
} |
Loading…
Reference in new issue