br-phone-formatter
v1.0.0
Published
Parse and format Brazilian phone numbers
Downloads
67
Readme
br-phone-formatter
A simple utility to parse and format Brazilian phone numbers.
Installation
You can install the package using npm:
npm install br-phone-formatter
Usage
In JavaScript:
const { formatPhoneNumber } = require('br-phone-formatter');
const formattedNumber = formatPhoneNumber('21992534567');
console.log(formattedNumber); // Output: (21) 99253-4567
In TypeScript:
import { formatPhoneNumber } from 'br-phone-formatter';
const formattedNumber: string = formatPhoneNumber('21992534567');
console.log(formattedNumber); // Output: (21) 99253-4567