const dummy = {
country: faker.helpers.uniqueArray(faker.address.country, 100),
};
console.log(dummy.country)
As far as the above code is concerned, 20 country names will be output, but some strings are too long (United States Minor Outlying Islands, South Georgia and the South Sandwich Islands etc...), I want to limit the length to 12 for example.
But i want to keep the total out total is 20.
Is faker.js builtin some function like this?