From project to project, I keep bringing my tiny function of making generated data unique:
def make_unique(string) do
"#{string}#{System.unique_integer([:positive, :monotonic])}"
end
make_unique(Faker.Pokemon.name())
While it's really tiny, I thought what if we had an option to pass extra opts, like unique: true, to any of the Faker modules functions? i.e., Faker.For example, Pokemon.name(unique: true) would generate Pikachu42.