Skip to content

Commit

Permalink
feat(funbox): add ALL CAPS
Browse files Browse the repository at this point in the history
  • Loading branch information
Miodec committed Dec 9, 2024
1 parent 33be339 commit 52fda9d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions frontend/src/ts/test/funbox/funbox-functions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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> {
Expand Down
8 changes: 8 additions & 0 deletions packages/funbox/src/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion packages/funbox/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export type FunboxName =
| "crt"
| "backwards"
| "ddoouubblleedd"
| "instant_messaging";
| "instant_messaging"
| "ALL_CAPS";

export type FunboxForcedConfig = Record<string, string[] | boolean[]>;

Expand Down

0 comments on commit 52fda9d

Please sign in to comment.