You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by jongbonga March 23, 2022
I want to create a collection of custom objects
e.g: const customObject = {this: randBoolean(), that: randShape(), ...} hand have and array of [customObject, ...].
Do I need to handle it myself with a loop or there is something randCollection({collection: customObject, length: 5}) already (I've gone through the doc and couldn't find such)?.
The text was updated successfully, but these errors were encountered:
manudss
added a commit
to manudss/falso
that referenced
this issue
Aug 11, 2022
…a generator function
Generate a collection from a custom generators functions
@category util
@example
toCollection(() => {
return { data: randNumber(); }
})
@example
toCollection(() => {
return { data: randNumber(); }
}, { length: 10 }) // default is no length.
It is a wrapper for the internal fake function.
Fixngneat#301
add a new generators to generate collection from a generator function
Generate a collection from a custom generators functions
@category util
@example
toCollection(() => {
return { data: randNumber(); }
})
@example
toCollection(() => {
return { data: randNumber(); }
}, { length: 10 }) // default is no length.
It is a wrapper for the internal fake function.
Discussed in #233
Originally posted by jongbonga March 23, 2022
I want to create a collection of custom objects
e.g:
const customObject = {this: randBoolean(), that: randShape(), ...}
hand have and array of[customObject, ...]
.Do I need to handle it myself with a loop or there is something
randCollection({collection: customObject, length: 5})
already (I've gone through the doc and couldn't find such)?.The text was updated successfully, but these errors were encountered: