Utilities for formatting and normalizing certain display aspects.
- Source:
Methods
(static) phone(phoneNumber) → {String}
Formats a phone number to (XXX) XXX-XXXX for cleaner display.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
phoneNumber |
String | The phone number to format. |
Returns:
- The formatted phone number.
- Type
- String
FormatUtils.phone('+13125556789'); // (312) 555-6789