catamphetamine / libphonenumber-js

A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript
https://catamphetamine.gitlab.io/libphonenumber-js/
MIT License
2.79k stars 216 forks source link

formatPhoneNumber doesn't format properly #337

Closed LitvinenkoEvgeny closed 5 years ago

LitvinenkoEvgeny commented 5 years ago

https://libphonenumber.appspot.com/phonenumberparser?number=89020423527&country=RU

const { formatPhoneNumber, formatPhoneNumberIntl } = require('react-phone-number-input/max');

const value = '89020423527';
console.log(formatPhoneNumber(value)); // in fact - returns empty string
console.log(formatPhoneNumberIntl(value)); // same here

"react-phone-number-input": "2.3.21" "libphonenumber-js": "^1.7.22",

What i'm doing wrong ?

catamphetamine commented 5 years ago

Provide a demo somewhere on codesandbox

LitvinenkoEvgeny commented 5 years ago

@catamphetamine https://codesandbox.io/s/intelligent-pascal-wpkz3