From 08a59591ae25280cf11e49d0f5eab4d5a438e147 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Sat, 25 Aug 2018 22:42:26 +0900 Subject: Use startsWith and endsWith for readability --- src/misc/fa.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/misc') diff --git a/src/misc/fa.ts b/src/misc/fa.ts index 077bb51e6d..8be06362c3 100644 --- a/src/misc/fa.ts +++ b/src/misc/fa.ts @@ -25,9 +25,9 @@ export const replacement = (match: string, key: string) => { arg == 'S' ? 'fas' : arg == 'B' ? 'fab' : ''; - } else if (arg[0] == '.') { + } else if (arg.startsWith('.')) { classes.push('fa-' + arg.substr(1)); - } else if (arg[0] == '-') { + } else if (arg.startsWith('-')) { transform = arg.substr(1).split('|').join(' '); } else { name = arg; -- cgit v1.2.3-freya