Skip to content

Instantly share code, notes, and snippets.

@Blakeinstein
Created October 14, 2020 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Blakeinstein/27102d389f71d43fda7718ef67ebca17 to your computer and use it in GitHub Desktop.
Save Blakeinstein/27102d389f71d43fda7718ef67ebca17 to your computer and use it in GitHub Desktop.
OwOifier for bloop
/**
{
"api":1,
"name":"OWOifier",
"description":"OWOify!",
"author":"Blaine",
"icon":"color-wheel",
"tags":"meme,text,joke,fun",
"bias":0.0
}
**/
var faces=["(・`ω´・)",";;w;;","owo","UwU",">w<","^w^"];
function owoify(text)
{
var v = text;
v = v.replace(/(?:r|l)/g, "w");
v = v.replace(/(?:R|L)/g, "W");
v = v.replace(/n([aeiou])/g, 'ny$1');
v = v.replace(/N([aeiou])/g, 'Ny$1');
v = v.replace(/N([AEIOU])/g, 'Ny$1');
v = v.replace(/ove/g, "uv");
var exclamationPointCount = 0;
var i;
var stringsearch = "!";
//for loop counts the # of individual exclamation points
for(var i=0; i < v.length; i++) {
stringsearch===v[exclamationPointCount++]
};
for (i = 0; i < exclamationPointCount; i++) {
v = v.replace("!", " "+ faces[Math.floor(Math.random()*faces.length)]+ " ");
}
return (v);
}
function main(state) {
try {
state.text = owoify(state.text);
}
catch(error) {
state.postError("Explain what went wrong here...")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment