From cd229ba1b8e57559337941fae37ef04da16ec407 Mon Sep 17 00:00:00 2001 From: Diego Cohen Date: Fri, 20 Dec 2024 14:48:20 -0500 Subject: [PATCH] Update var naming in convertCamelToShishKabobCase --- src/utils/appUtils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/appUtils.ts b/src/utils/appUtils.ts index 09beee05..41a4c9e2 100644 --- a/src/utils/appUtils.ts +++ b/src/utils/appUtils.ts @@ -152,7 +152,7 @@ export const convertToSentenceCase = (str: string) => export const convertCamelToShishKabobCase = (str: string) => str // Change capital letters into "-{lowercase letter}" - .replace(/([A-Z])/g, (c, p1, i) => { + .replace(/([A-Z])/g, (capitalLetter, placeholderVar, index) => { // If capital letter is not first character, precede with '-': - return (i > 0 ? "-" : "") + c.toLowerCase() + return (index > 0 ? "-" : "") + capitalLetter.toLowerCase() })