You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds countries(), the list of ISO codes a number can be generated for (the accessor address-generator has), and country_count() is its size. has_country() now means a number can be generated for the country. Seeded output is unchanged.
Breaking: names the country like the other generators. phone.country_code was the calling code ("55"); it is now the ISO 3166-1 alpha-2 code, as in address-generator, city-generator, birth-generator and others, and the old calling code is phone.calling_code. phone.country is gone. The JSON key country is now country_code. Seeded output is unchanged.
Fixes the length of generated numbers. 1.0.0 weighted every allowed length by its number space, so plans with long lengths produced mostly long numbers: 99% of German fixed-line numbers had 17 digits, past E.164's 15. Lengths that exceed 15 digits with the calling code are now left out, and a plan with several lengths is drawn mostly at the length of libphonenumber's example number (a quarter as often per digit away). Seeded output changes for countries with several lengths and for the data hash.
First release. Phone numbers valid in each country's numbering plan, drawn from libphonenumber's ranges: E.164, international, national and RFC 3966 forms, a safe option for tests, seeded batch and streaming generation, layered data.