Random case vaultId
This commit is contained in:
parent
a86a056888
commit
ff02fee6a5
5 changed files with 49 additions and 24 deletions
10
frontend/test-client/src/utils/random-casing.ts
Normal file
10
frontend/test-client/src/utils/random-casing.ts
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
export function randomCasing(str: string): string {
|
||||
const chars = str.split("");
|
||||
const randomCasedChars = chars.map((char) => {
|
||||
if (Math.random() < 0.5) {
|
||||
return char.toUpperCase();
|
||||
}
|
||||
return char.toLowerCase();
|
||||
});
|
||||
return randomCasedChars.join("");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue