Nikolay

Results 285 comments of Nikolay

In any case, one could also use the `Metadata` class and then inspect its methods. For example, this one: https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/26b50cdd5c61416ebd12bcbc77045bfe400bb28d/source/metadata.js#L99

It actually says it at the end of the readme section: https://gitlab.com/catamphetamine/libphonenumber-js#programmatic-access > As one can see, the `Metadata` class is not documented much. Partially, that's because its usage is...

So if someone provides a sensible use case for a `getCountryCodesForCallingCode()` method then I'd include it in the readme.

If a phone number belongs to any country, its ‘country’ will be set. Otherwise, the country is unknown On Wed, 21 Dec 2022 at 23:23, rwev ***@***.***> wrote: > A...

> There's a difference between "the country is unknown" and "there are multiple countries available"... No. "Country is unknown" means exactly that. > Some phone number can belong to multiple...

> Access metadata, which are not typed btw, seems a little bit random. Metadata is perfectly typed and accessing it is in no way random.

Published `[email protected]`: Added `PhoneNumber.getPossibleCountries()` function. It returns a list of countries this phone number could possibly belong to. Can be used when parsing complete international phone numbers containing a "calling...

@hanselsen > I have the same request. What request?

Thanks for the suggestions. I'm not a TypeScript expert, but: * I've refactored `type CountryCode` to read from the JSON file, as @lnhrdt suggested * I didn't `export` `const CountryCodes`...

Reverted the change because of https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/94