@already-existed/phone-number-beautifier

Lib for beautify phone number.

Usage no npm install needed!

<script type="module">
  import alreadyExistedPhoneNumberBeautifier from 'https://cdn.skypack.dev/@already-existed/phone-number-beautifier';
</script>

README

Phone Number Beautifier

Lib for beautify phone number.

Installation

npm i -S @already-existed/phone-number-beautifier

Usage

// Ex: React Component
import { beautify } from '@already-existed/phone-number-beautifier'

function PhoneNumber({ value }: { value: string }) {
  return <>{beautify(value)}</>
}

function App() {
  return <PhoneNumber value="+380997836811"> // +380 (99) 78-36-811
}