add phonenumber convert
This commit is contained in:
parent
99ab9428df
commit
2ee7f95df6
1 changed files with 2 additions and 2 deletions
|
|
@ -204,8 +204,8 @@ export function saferKorean(input: string): string {
|
|||
.replace(/[ㄱ-ㅎㄲㄸㅃㅆㅉ]/g, (char: string) => ChoseongMap[char as keyof typeof ChoseongMap])
|
||||
|
||||
// Process number, unit
|
||||
.replace(/[\d\-]+/g, (phone: string) => {
|
||||
if (!phone.includes("-")) return phone;
|
||||
.replace(/(\+\d+[\s\-]+)?([\d\-]+)/g, (_, prefix: string, phone: string) => {
|
||||
if (!phone.includes("-")) return prefix + phone;
|
||||
return PhoneNumberKorean.convert(phone);
|
||||
})
|
||||
.replace(/([\d,]+)([kKMmgGtTpP][iI]?)[bB]/g, (_, num: string, mod: string) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue