Function default

  • Parses a phone number to a default format.

    Export

    Returns

    phone number in the format <regional indicator> (0) <phone number>

    Example

    $ parsePhoneNumber('00999 0480/80.80.80');
    $ '+999 (0) 480 80 80 80'

    Parameters

    • phoneNumber: string

    Returns string