Returns a random number of minutes, with a unit of milliseconds.
Max value is exclusive.
Use minutesMs to get a value directly, or minutesMsSource to return a function.
Example: Random value from 0 to one milli less than 5 * 60 * 1000
// Create function that returns value constf = minutesMsSource(5);
f(); // Generate value
Example: Specified options:
// Random time between one minute and 5 minutes constf = minutesMsSource({ max:5, min:1 }); f();
Remarks
It's a very minor function, but can make
code a little more literate:
// Random timeout of up to 5 mins setTimeout(() => { ... }, minutesMsSource(5));
Returns a random number of minutes, with a unit of milliseconds. Max value is exclusive. Use minutesMs to get a value directly, or minutesMsSource to return a function.
Example: Random value from 0 to one milli less than 5 * 60 * 1000
Example: Specified options:
Remarks
It's a very minor function, but can make code a little more literate:
See
minutesMs