country-code-lookup
country-code-lookup copied to clipboard
isoNo returns non-standardized format
Running the isoNo method can return a single or two character string. For example, looking up Afghanistan's ISO numeric-3 country code returns '4' instead of '004'. This can be fixed by enforcing string length of 3 for isoNo values and adding leading zeros as padding using JS's padStart method. I'd be happy to help you implement this if you want some assistance. 🙂
yes, I agree, they should be 3 digits with a padding of zeros. I would prefer to fix in the source data if possible. Which is something I'll look at later today.