randInList
MathRobin opened this issue · comments
Mathieu KIM ROBIN commented
First, many thanks for your work and the great doc^^
Description
Being able to define a list of words (or whatever) and provides one of them
Proposed solution
falso.randInList(['foo', 'bar']);
// foo
falso.randInList(['foo', 'bar']);
// bar
Alternatives considered
No response
Do you want to create a pull request?
No
Leon Radley commented
in the core package there is a randElement
that takes an array.
could we export that?
Ryan Smee commented
Sorry for the delayed reply. Yeah that was my thinking too.
It might be worth moving it of core, (Maybe even aliasing it as something like randInList
)
Ryan Smee commented
@rothsandro - Ah yeah, great shout! I'll close this then 😊
Mathieu KIM ROBIN commented
Didn't saw it. Exactly what I wanted. Many thanks!