diff options
| 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 |
| commit | 38b1357c0870597ee58b3f0f5086ae93ffceb5f5 (patch) | |
| tree | 874f4a7c4a8b12ecc358d91a0573aca17b2c4e6a /src/common-util/wiki-data.js | |
| parent | 553e714535eb097db61e0190a8e4064425e39bd2 (diff) | |
wiki-data: compareKebabCase
Diffstat (limited to 'src/common-util/wiki-data.js')
| -rw-r--r-- | src/common-util/wiki-data.js | 5 |
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: |