5 function generateRandomInteger (max
, min
= 0) {
7 return Math
.floor(Math
.random() * (max
- min
+ 1) + min
)
9 return Math
.floor(Math
.random() * max
+ 1)
15 async
function sleep (ms
) {
16 return new Promise(resolve
=> setTimeout(resolve
, ms
))
19 const LIST_FORMATTER
= new Intl
.ListFormat('en-US', {
24 module
.exports
= { generateRandomInteger
, sleep
, LIST_FORMATTER
}