diff options
author | polwex <polwex@sortug.com> | 2025-06-02 23:05:36 +0700 |
---|---|---|
committer | polwex <polwex@sortug.com> | 2025-06-02 23:05:36 +0700 |
commit | 904b34de8f7748b7954d88784369b9cae6fa92fb (patch) | |
tree | 53bb5cb3377ae40d8bfa44087a0c712edd6c9d02 /src/lib/utils.ts | |
parent | a03c92dc82ad527d7da6bbaa3c43000e2e5f0e69 (diff) |
all me here should merge
Diffstat (limited to 'src/lib/utils.ts')
-rw-r--r-- | src/lib/utils.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 9bc74b8..0674dea 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -57,3 +57,9 @@ export function getRandomHexColor() { // Ensure the color code is always 6 digits by padding with zeros if needed return "#" + randomColor.padStart(6, "0"); } + +export function cleanIpa(ipa: string): string { + const r1 = /\.\//; + const r2 = /[\[\]\/]/g; + return ipa.replace(r1, "").replace(r2, ""); +} |