We marked it as 'waiting for user interest' for now to gather some feedback from our community: I would like to have it very basic and easy to use for now.Īnd if a locale doesn't have such thing, I'm satisfied with undefined for now. Yes, that would be nice in the long run, but I don't want to pass an algorithm or pattern as developer to faker, in that case I could just write it myself. Something like fake() and mustache() but for generic objects/arrays/elements.
You just have to describe the thing you want. You want a single identity card number that is generated based on a specific pattern? You will get it.
You want an array of x-y foobars? You will get it. You want a credit card with name, number, expiration date.? You get will get it. Or even more generically, a method that just takes the generation config and will build it for you. The you can have one pattern for driving licences, for personal identity card numbers. We could use a Record to define these things and the user has to know or lookup which generators are available for generateId(type: string).