dist-esnext/index.js
function getRandomItem(list) {
    if (!list)
        return null;
    if (list.length === 0)
        return list[0];
    const randomIndex = random(1, list.length) - 1;
    return list[randomIndex];
}
function getRandomItem(list) {
    if (!list)
        return null;
    if (list.length === 0)
        return list[0];
    const randomIndex = random(1, list.length) - 1;
    return list[randomIndex];
}
function getRandomItem ( list ) { if ( ! list ) return null ; if ( list . length === 0 ) return list [ 0 ] ; const randomIndex = random ( 1 , list . length ) - 1 ; return list [ randomIndex ] ; }
Gets some random item from the given array.
@param list
Gets some random item from the given array .