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