function randomElm()

in db/generate_orders.js [55:58]


function randomElm (arr) {
  if (arr.length === 0) throw new Error('empty table!')
  return arr[random(arr.length - 1)]
}