mirror of
https://github.com/movie-web/providers.git
synced 2025-09-13 11:33:25 +00:00
prettier fix
This commit is contained in:
@@ -2,15 +2,13 @@ import { CommonMedia } from '@/entrypoint/utils/media';
|
|||||||
|
|
||||||
export function normalizeTitle(title: string): string {
|
export function normalizeTitle(title: string): string {
|
||||||
let titleTrimmed = title.trim().toLowerCase();
|
let titleTrimmed = title.trim().toLowerCase();
|
||||||
if (((titleTrimmed !== "the movie" && titleTrimmed.endsWith("the movie")))) {
|
if (titleTrimmed !== 'the movie' && titleTrimmed.endsWith('the movie')) {
|
||||||
titleTrimmed = titleTrimmed.replace("the movie", "");
|
titleTrimmed = titleTrimmed.replace('the movie', '');
|
||||||
}
|
}
|
||||||
if (((titleTrimmed !== "the series" && titleTrimmed.endsWith("the series")))) {
|
if (titleTrimmed !== 'the series' && titleTrimmed.endsWith('the series')) {
|
||||||
titleTrimmed = titleTrimmed.replace("the series", "");
|
titleTrimmed = titleTrimmed.replace('the series', '');
|
||||||
}
|
}
|
||||||
return titleTrimmed
|
return titleTrimmed.replace(/['":]/g, '').replace(/[^a-zA-Z0-9]+/g, '_');
|
||||||
.replace(/['":]/g, "")
|
|
||||||
.replace(/[^a-zA-Z0-9]+/g, "_");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function compareTitle(a: string, b: string): boolean {
|
export function compareTitle(a: string, b: string): boolean {
|
||||||
|
Reference in New Issue
Block a user