as the title says, I want to implement Faker library to seed a mock country data. However, from what I've known you can only use Faker to generate alpha 2 country code (e.g, US, CN, CA) and I have a need to use Faker to generate Alpha 3 country code (e.g, USA, CHN, CAN). Is there a way for me to achieve this using Faker on NestJS? Thanks in advance
You can pass 'alpha-3' as an argument to faker.address.countryCode
I found it in the source code here : https://github.com/Marak/faker.js/blob/master/lib/address.js#L194
You can test it in the dev console of their live demo here : https://rawgit.com/Marak/faker.js/master/examples/browser/index.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With