function normalizePhone
normalizePhone(
phone: string,
prefix: string,
): string

Strip non-numeric characters from a phone number, then prefix if it starts with 0

Parameters

phone: string
prefix: string

Return Type

string

Usage

import { normalizePhone } from "doc.ts";