From d88c9f95a09c75d84ca2478e61d92d68c91586b4 Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Thu, 3 Apr 2025 10:35:47 +0200 Subject: [PATCH] Allow PascalCase names in component function --- observable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/observable.js b/observable.js index 30baaf6..32032ab 100644 --- a/observable.js +++ b/observable.js @@ -2,7 +2,7 @@ const abortRegistry = new FinalizationRegistry(controller => controller.abort()) /** @param {String} string */ -const camelToKebab = string => string.replace(/([a-z])([A-Z])/g, (_, a, b) => `${a}-${b.toLowerCase()}`) +const camelToKebab = string => string.replace(/([a-z])([A-Z])/g, (_, a, b) => `${a}-${b}`).toLowerCase() /** @param {String} string */ const kebabToCamel = string => string.replace(/([a-z])-([a-z])/g, (_, a, b) => a+b.toUpperCase())