Skip to content
revameg edited this page Apr 14, 2024 · 15 revisions

the random section of stews is a built in random class with things like random number generators and choosers

it works with most types like Stews, Soups, Noodles, Arrays, Objects, Sets, Maps, etc
type: AeplClass


arguments:

  • ?binder Any:
    thing that it's binded to if an object is not given for things like choice or index


const { random } = require('stews');

random.int(1, 5);

random.choice([ "a", "b", "c" ]);