Any property returns area code?
TheMuyu opened this issue · comments
Murat Yurtdas commented
Hi,
using asYouType, is there a way to get area code like getting country code? Or do I need to extract it using template?
const asYouType = new AsYouType();
asYouType.input('+351220404000');
console.log(asYouType.getCountry())
can we have like asYouType.getAreaCode()
Nikolay commented
Murat Yurtdas commented
.getCallingCode()
Hello this is returning country code I want to get area code which is after country code in masking
number: +351220404000
mask: xxxx xx xxx xxxx (.getTemplate())
formatted: +351 22 040 4000
so in there .getCallingCode()
is returning 351
but I want area code which is 22
.
Its basically second element of masking. I'm extracting it from there but I would like to know if there is a property about it.
Nikolay commented
Oh, you meant "area code".
There's no function for that.