diff --git a/packages/utils/saferKorean.ts b/packages/utils/saferKorean.ts index 903fbc1..e85f943 100644 --- a/packages/utils/saferKorean.ts +++ b/packages/utils/saferKorean.ts @@ -204,12 +204,12 @@ export function saferKorean(input: string): string { .replace(/[ㄱ-ㅎㄲㄸㅃㅆㅉ]/g, (char: string) => ChoseongMap[char as keyof typeof ChoseongMap]) // Process number, unit - .replace(/(\+\d+[\s\-]+)?([\d\-]+)/g, (_, prefix: string, phone: string) => { + .replace(/(\+\d+[\s\-]+)?([\d\-]+)/g, (_, prefix: string | undefined, phone: string) => { const all = (prefix ?? "") + phone; if (!phone.includes("-")) return all; return PhoneNumberKorean.convert(all); }) - .replace(/([\d,]+)([kKMmgGtTpP][iI]?)[bB]/g, (_, num: string, mod: string) => { + .replace(/([\d,]+)([kKMmgGtTpPeEzZyY][iI]?)[bB]/g, (_, num: string, mod: string) => { // 10kib => 십키비바이트 num = IntegerKorean.convertFromString(num); mod = SIPrefix[mod.toLowerCase() as keyof typeof SIPrefix];