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.
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));
Example: Random value from 0 to one milli less than 5 * 60 * 1000
// Random value from 0 to one milli less than 5*60*1000 minuteMs(5);
Example: Specified options:
// Random time between one minute and 5 minutes minuteMs({ max:5, min:1 });
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.
Remarks
It's a very minor function, but can make code a little more literate:
Example: Random value from 0 to one milli less than 5 * 60 * 1000
Example: Specified options:
See
minutesMsSource