From 904b34de8f7748b7954d88784369b9cae6fa92fb Mon Sep 17 00:00:00 2001 From: polwex Date: Mon, 2 Jun 2025 23:05:36 +0700 Subject: all me here should merge --- src/lib/utils.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/lib/utils.ts') 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, ""); +} -- cgit v1.2.3