randInList
MathRobin opened this issue · 5 comments
MathRobin 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 commented
in the core package there is a randElement
that takes an array.
could we export that?
theryansmee 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
)
rothsandro commented
Isn't that the same as the already existing rand()
function (docs)?
theryansmee commented
@rothsandro - Ah yeah, great shout! I'll close this then 😊
MathRobin commented
Didn't saw it. Exactly what I wanted. Many thanks!