falso icon indicating copy to clipboard operation
falso copied to clipboard

Randomly length for toCollection generator

Open manudss opened this issue 2 years ago • 0 comments

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] The commit message follows our guidelines: https://github.com/ngneat/falso/blob/master/CONTRIBUTING.md#commit
  • [x] Tests for the changes have been added (for bug fixes / features)
  • [x] Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[x] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

toCollection function will return the length specified number of items.

Issue Number: 303

What is the new behavior?

Add some new parameters, minLength and maxLength. If one or both are specified, toCollection Function will generate a random list of item (from minLength and maxLength).

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

manudss avatar Aug 17 '22 13:08 manudss