fix: add privacy-policy
This commit is contained in:
10
src/shared/lib/phoneBeautify/phoneBeautify.ts
Normal file
10
src/shared/lib/phoneBeautify/phoneBeautify.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
export function phoneBeautify(phone: string): string {
|
||||
const cleaned = phone.replace(/[^\d+]/g, '');
|
||||
|
||||
const match = cleaned.match(/^\+?7(\d{3})(\d{3})(\d{2})(\d{2})$/);
|
||||
if (!match) return phone;
|
||||
|
||||
const [, code, part1, part2, part3] = match;
|
||||
|
||||
return `+7 (${code}) ${part1}-${part2}-${part3}`;
|
||||
}
|
||||
Reference in New Issue
Block a user