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.77k stars 217 forks source link

Formatting "FR" phone number not always working #189

Closed WizardPC closed 6 years ago

WizardPC commented 6 years ago

Bug, feature request, or proposal:

Bug

What is the expected behavior?

For format(value,'FR','National');

For format(value,'FR','International');

What is the current behavior?

For format(value,'FR','National');

For format(value,'FR','International');

Is there anything else we should know?

It's working good on the demo : https://catamphetamine.github.io/libphonenumber-js/

catamphetamine commented 6 years ago

What is the current behavior?

On the demo page, if I set country to FR then

For format(value,'FR','National');

For format(value,'FR','International');

Therefore it's working.

Make sure to supply a parsed number to format. https://github.com/catamphetamine/libphonenumber-js#formatparsednumber-format-options

Alternatively you could create a PR with a test case illustrating the issue. Closing it otherwise.