Transforms: add Ubbi Dubbi and Rövarspråket (reversible); register in Format category

This commit is contained in:
EP
2025-08-20 18:30:13 -07:00
parent 97dc1651e1
commit f8a2aa0e54
2 changed files with 29 additions and 1 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ window.app = new Vue({
encoding: ['Base64', 'Base64 URL', 'Base32', 'Base45', 'Base58', 'Base62', 'Binary', 'Hexadecimal', 'ASCII85', 'URL Encode', 'HTML Entities'],
cipher: ['Caesar Cipher', 'ROT13', 'ROT47', 'Morse Code', 'Atbash Cipher', 'ROT5', 'Vigenère Cipher', 'Rail Fence (3 Rails)', 'Rail Fence (5 Rails)', 'XOR Cipher (KEY)'],
visual: ['Rainbow Text', 'Strikethrough', 'Underline', 'Reverse Text', 'Alternating Case', 'Reverse Words', 'Random Case', 'Swap Case', 'Title Case', 'Sentence Case', 'Emoji Speak'],
format: ['Pig Latin', 'Leetspeak', 'NATO Phonetic', 'camelCase', 'snake_case', 'kebab-case', 'Squash Whitespace'],
format: ['Pig Latin', 'Leetspeak', 'Ubbi Dubbi', 'Rövarspråket', 'NATO Phonetic', 'camelCase', 'snake_case', 'kebab-case', 'Squash Whitespace'],
unicode: ['Invisible Text', 'Upside Down', 'Full Width', 'Small Caps', 'Bubble', 'Braille', 'Greek Letters', 'Wingdings', 'Superscript', 'Subscript', 'Regional Indicator Letters', 'Fraktur', 'Cyrillic Stylized', 'Katakana', 'Hiragana', 'Roman Numerals'],
special: ['Medieval', 'Cursive', 'Monospace', 'Double-Struck', 'Elder Futhark', 'Mirror Text', 'Zalgo', 'Unicode Normalize (NFC)', 'Unicode Normalize (NFD)', 'Strip Diacritics', 'Unicode Escape (\u)'],
fantasy: ['Quenya (Tolkien Elvish)', 'Tengwar Script', 'Klingon', 'Aurebesh (Star Wars)', 'Dovahzul (Dragon)'],
+28
View File
@@ -2173,6 +2173,34 @@ const transforms = {
preview: function(text) { return this.func(text); }
},
// Ubbi Dubbi (add 'ub' before vowels)
ubbi_dubbi: {
name: 'Ubbi Dubbi',
func: function(text) {
if (!text) return '';
return text.replace(/([AEIOUaeiou])/g, 'ub$1');
},
preview: function(text) { return this.func(text || 'hello'); },
reverse: function(text) {
if (!text) return '';
return text.replace(/ub([AEIOUaeiou])/g, '$1');
}
},
// Rövarspråket (Robber's language): consonant -> consonant + 'o' + consonant
rovarspraket: {
name: 'Rövarspråket',
func: function(text) {
if (!text) return '';
return text.replace(/([b-df-hj-np-tv-z])/gi, (m) => m + 'o' + m);
},
preview: function(text) { return this.func(text || 'robber'); },
reverse: function(text) {
if (!text) return '';
return text.replace(/([b-df-hj-np-tv-z])o\1/gi, '$1');
}
},
subscript: {
name: 'Subscript',
map: {