2019-02-11 01:00:32 +05:30

3 lines
113 B
JavaScript

module.exports = (list = []) => (n = 1) =>
Array(n).fill(0).map(list[Math.floor(Math.random() * list.length)]);