Open alexandr-bbm opened 7 years ago
same problem:
phoneFormatter.format('881212345678', 'N (NNN) NNN-NN-NN'));
// "(121) 234-56-7N"
same problem:
phoneFormatter.format('881212345678', 'N (NNN) NNN-NN-NN'));
// "(121) 234-56-7N"
Disable normalization by adding third param {normalize: true}
, true
actually disables it 😕
phoneFormatter.format('881212345678', 'N (NNN) NNN-NN-NN', {normalize: true});
Thankyou @davidlomidze , it works like charm
Please see the code example. The problem is that normalize cut first digit in phone number
var phoneFormatter = require('phone-formatter'); console.log(phoneFormatter.format('13338008404', 'NNN NNNN NNNN')); // "333 8008 404N"
https://runkit.com/582dacb99cde3d0013426605/582dacb99cde3d0013426606