2025-02-17 09:29:18 +07:00

15 lines
322 B
TypeScript

import {expose} from "@kksh/api/headless";
import {BaseExt} from "./base";
class RandomCaseExt extends BaseExt {
constructor() {
super(string => {
return string.split("").map(char => {
return Math.random() > 0.5 ? char.toUpperCase() : char.toLowerCase();
}).join("");
});
}
}
expose(new RandomCaseExt())