aboutsummaryrefslogtreecommitdiff
path: root/src/app.ts
blob: f28037f57b097c976d88be7e039824d3458eef11 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
const uwufy = (input: string): string => {
    input = input.replace(/(?:l|r)/g, 'w');
    input = input.replace(/(?:L|R)/g, 'W');
    input = input.replace(/!+/g, ` >w< `);
    let f = Math.random() < 0.25
    if (f) {
        let c = input.charAt(0)
        input = c + '-' + input
    }
    return input;
}
export = uwufy;