@loadsmart/utils-phone-number
v0.3.1
Published
useful functions for manipulating phone numbers
Downloads
109
Maintainers
Keywords
Readme
utils-phone-number
useful functions for manipulating phone numbers
Install via NPM
$ npm i @loadsmart/utils-phone-number --save
Install via yarn
$ yarn add @loadsmart/utils-phone-number
Usage
import React from 'react'
import { format } from '@loadsmart/utils-phone-number'
const phone = '+12345678910'
const mask = '+X (XXX) XXX-XXXX'
export default () => (
<div>
formatted: {format(phone, mask)}, should render: (+1 (234) 567-8910)
</div>
)