1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-03 16:38:31 +00:00
The Great Maintenance Update. No new features here. Instead, we've updated the build system to webpack 4, updated all our dependencies, and cleaned up a lot of linting issues.
This commit is contained in:
SirStendec 2019-06-20 15:15:54 -04:00
parent 014eb203c3
commit 33e81bc7eb
60 changed files with 238 additions and 209 deletions

View file

@ -14,20 +14,18 @@ import NewTransCore from 'utilities/translation-core';
const FACES = ['(・`ω´・)', ';;w;;', 'owo', 'ono', 'oAo', 'oxo', 'ovo;', 'UwU', '>w<', '^w^', '> w >', 'v.v'],
transformText = (ast, fn) => {
return ast.map(node => {
if ( typeof node === 'string' )
return fn(node);
transformText = (ast, fn) => ast.map(node => {
if ( typeof node === 'string' )
return fn(node);
else if ( typeof node === 'object' && node.o ) {
const out = Object.assign(node, {o: {}});
for(const key of Object.keys(node.o))
out.o[key] = transformText(node.o[key], fn)
}
else if ( typeof node === 'object' && node.o ) {
const out = Object.assign(node, {o: {}});
for(const key of Object.keys(node.o))
out.o[key] = transformText(node.o[key], fn)
}
return node;
})
},
return node;
}),
owo = text => text
.replace(/(?:r|l)/g, 'w')