From 7a2c255ea8151d03781a880b94004c82647b7e71 Mon Sep 17 00:00:00 2001 From: Jorrin Date: Thu, 14 Mar 2024 21:44:00 +0100 Subject: [PATCH] prettier fix --- src/utils/compare.ts | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/utils/compare.ts b/src/utils/compare.ts index 370735f..7db784e 100644 --- a/src/utils/compare.ts +++ b/src/utils/compare.ts @@ -2,15 +2,13 @@ import { CommonMedia } from '@/entrypoint/utils/media'; export function normalizeTitle(title: string): string { let titleTrimmed = title.trim().toLowerCase(); - if (((titleTrimmed !== "the movie" && titleTrimmed.endsWith("the movie")))) { - titleTrimmed = titleTrimmed.replace("the movie", ""); + if (titleTrimmed !== 'the movie' && titleTrimmed.endsWith('the movie')) { + titleTrimmed = titleTrimmed.replace('the movie', ''); } - if (((titleTrimmed !== "the series" && titleTrimmed.endsWith("the series")))) { - titleTrimmed = titleTrimmed.replace("the series", ""); + if (titleTrimmed !== 'the series' && titleTrimmed.endsWith('the series')) { + titleTrimmed = titleTrimmed.replace('the series', ''); } - return titleTrimmed - .replace(/['":]/g, "") - .replace(/[^a-zA-Z0-9]+/g, "_"); + return titleTrimmed.replace(/['":]/g, '').replace(/[^a-zA-Z0-9]+/g, '_'); } export function compareTitle(a: string, b: string): boolean {