diff options
-rw-r--r-- | src/data/things/language.js | 12 |
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) { |