MSE-Translator/translate.js
2024-03-26 19:56:49 +13:00

11 lines
362 B
JavaScript

module.exports.translate = (string, options) => {
return(string
.replace(/ss/gi, "\$\$\$") // Only 2 ss to $
.replace(/s/gi, "SS") // Singular s to SS
.replace(/k/gi, "KKK") // K
.replace(/\bcan/gi, "KKKlan") // Klan
.replace(/c(?![heiy])/gi, "KKK") // Replace c's that will sound like /k/
.replace(/kkkkkk/gi, "KKK") //shorten ck, kk and cc
)
}