Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select random element from array instead of always the first element #18

Open
Benny93 opened this issue Dec 20, 2022 · 1 comment
Open

Comments

@Benny93
Copy link

Benny93 commented Dec 20, 2022

) || namespaced[0];

namespaced[0] could be changed to something like (namespaced[Math.floor(Math.random()*namespaced.length)]) .

@nicolaslt
Copy link
Contributor

Welcome!

I agree 😊 .

It would be a major version bump.

We'd also need to make sure to use generator.random instead to Math.random, so that the Seeded option stays deterministic (and/or to keep control of randomness something entirely configurable).

I'd be happy to review a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants