diff options
author | Miodec <[email protected]> | 2024-12-09 13:09:18 +0100 |
---|---|---|
committer | Miodec <[email protected]> | 2024-12-09 13:10:02 +0100 |
commit | 52fda9d8ed66d5dd1899162fc1826d85af89210a (patch) | |
tree | 26dc3920542a54d50d8064b6f3aab2cd2068ead6 | |
parent | 33be339a6032dd9b23c4519f44ad08b062f0c994 (diff) | |
download | monkeytype-52fda9d8ed66d5dd1899162fc1826d85af89210a.tar.gz monkeytype-52fda9d8ed66d5dd1899162fc1826d85af89210a.zip |
feat(funbox): add ALL CAPS
-rw-r--r-- | frontend/src/ts/test/funbox/funbox-functions.ts | 5 | ||||
-rw-r--r-- | packages/funbox/src/list.ts | 8 | ||||
-rw-r--r-- | packages/funbox/src/types.ts | 3 |
3 files changed, 15 insertions, 1 deletions
diff --git a/frontend/src/ts/test/funbox/funbox-functions.ts b/frontend/src/ts/test/funbox/funbox-functions.ts index 73d606979..a0fe543d7 100644 --- a/frontend/src/ts/test/funbox/funbox-functions.ts +++ b/frontend/src/ts/test/funbox/funbox-functions.ts @@ -620,6 +620,11 @@ const list: Partial<Record<FunboxName, FunboxFunctions>> = { $("#globalFunBoxTheme").attr("href", ``); }, }, + ALL_CAPS: { + alterText(word: string): string { + return word.toUpperCase(); + }, + }, }; export function getFunboxFunctions(): Record<FunboxName, FunboxFunctions> { diff --git a/packages/funbox/src/list.ts b/packages/funbox/src/list.ts index 06a5055f5..b1be30981 100644 --- a/packages/funbox/src/list.ts +++ b/packages/funbox/src/list.ts @@ -406,6 +406,14 @@ const list: Record<FunboxName, FunboxMetadata> = { frontendFunctions: ["alterText"], name: "instant_messaging", }, + ALL_CAPS: { + description: "WHY ARE WE SHOUTING?", + canGetPb: false, + difficultyLevel: 1, + properties: ["changesCapitalisation"], + frontendFunctions: ["alterText"], + name: "ALL_CAPS", + }, }; export function getFunbox(name: FunboxName): FunboxMetadata; diff --git a/packages/funbox/src/types.ts b/packages/funbox/src/types.ts index 8a19d9117..c410a911f 100644 --- a/packages/funbox/src/types.ts +++ b/packages/funbox/src/types.ts @@ -38,7 +38,8 @@ export type FunboxName = | "crt" | "backwards" | "ddoouubblleedd" - | "instant_messaging"; + | "instant_messaging" + | "ALL_CAPS"; export type FunboxForcedConfig = Record<string, string[] | boolean[]>; |