Closed clang13 closed 3 months ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@clang13 could you fix the conflicts and warnings please? I'll check the code soon
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
First off, this is a great package that I've found to be a real help in creating Storybook stories and test data. I hope this contribution seems useful!
I found it useful to have generators that provide more variety than is available from calling a single casual or faker generator (for instance, fields which are often null but occasionally have data). While this is possible via custom code, I prefer to make it more explicit through the configuration itself.
This PR adds support for passing an array of generator options to both the
scalar
andfieldGeneration
options. If an array is provided, one option will be chosen at random each time a value is generated. By default each is equally likely, but aweight
parameter can be specified to change the relative likelihood of each option.Examples from the docs:
which could also be written as: