« get me outta code hell

wiki-data: compareKebabCase - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/common-util/wiki-data.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2026-01-01 16:31:34 -0400
committer(quasar) nebula <qznebula@protonmail.com>2026-01-01 16:31:34 -0400
commit38b1357c0870597ee58b3f0f5086ae93ffceb5f5 (patch)
tree874f4a7c4a8b12ecc358d91a0573aca17b2c4e6a /src/common-util/wiki-data.js
parent553e714535eb097db61e0190a8e4064425e39bd2 (diff)
wiki-data: compareKebabCase
Diffstat (limited to 'src/common-util/wiki-data.js')
-rw-r--r--src/common-util/wiki-data.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common-util/wiki-data.js b/src/common-util/wiki-data.js
index 04857cfb..42bbc939 100644
--- a/src/common-util/wiki-data.js
+++ b/src/common-util/wiki-data.js
@@ -59,6 +59,11 @@ export function getKebabCase(name) {
   return getCaseSensitiveKebabCase(name).toLowerCase();
 }
 
+export function compareKebabCase(name1, name2) {
+  if (!name1 || !name2) return false;
+  return getKebabCase(name1) === getKebabCase(name2);
+}
+
 // Specific data utilities
 
 // Matches heading details from commentary data in roughly the format: