Skip to content

Update pickOne() #1

@iambj

Description

@iambj

The function is too terse. It should just take any array of inputs and pick one. Types probably shouldn't even matter as one input could be a primitive and another a function that returns a primitive. Weights should also be optional in all situations - whether one input has one or not shouldn't force all to require one in object form. All inputs are weighted at 1 and any inputs that happen to be an object with a weight in it should be obeyed. The only issue here is that if by chance an input is an object and has a property of "weight", values would be wrong or overwritten.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions