« get me outta code hell

data: Language.typicallyLowerCase - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2025-06-04 20:45:03 -0300
committer(quasar) nebula <qznebula@protonmail.com>2025-06-04 20:45:03 -0300
commit19c146ee09c9cafac3dab3c0369f7335892077c8 (patch)
treebd61ef959a4a0770df4c2fc905606bc6949da822 /src
parent3a00b3fae2c96fdc3d7a36a33156a89250856640 (diff)
data: Language.typicallyLowerCase
Total bullshit. Sorry!
Diffstat (limited to 'src')
-rw-r--r--src/data/things/language.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/data/things/language.js b/src/data/things/language.js
index 4e23cf7f..b0124c10 100644
--- a/src/data/things/language.js
+++ b/src/data/things/language.js
@@ -865,6 +865,18 @@ export class Language extends Thing {
     }
   }
 
+  typicallyLowerCase(string) {
+    // Utter nonsense implementation, so this only works on strings,
+    // not actual HTML content, and will loudly disrespect *intentful*
+    // capitalization of whatever goes into it.
+
+    if (typeof string === 'string') {
+      return string[0].toLowerCase() + string.slice(1).toLowerCase();
+    } else {
+      return string;
+    }
+  }
+
   // Utility function to quickly provide a useful string key
   // (generally a prefix) to stuff nested beneath it.
   encapsulate(...args) {