init
This commit is contained in:
parent
0633308ca1
commit
2a2f913b0e
8
package.json
Normal file
8
package.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"name": "mse-translator",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "Maoist Standard English Translator",
|
||||||
|
"main": "translate.js",
|
||||||
|
"license": "GPLv3-or-later",
|
||||||
|
"private": true
|
||||||
|
}
|
10
translate.js
Normal file
10
translate.js
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
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
|
||||||
|
)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user