Function randomizeCrypto

  • Randomize an Array with crypto

    Type Parameters

    • Arr extends any[]

    Parameters

    Returns Arr

    Example

    import { array } from "@rjweb/utils"

    const arr = ['A', 'B', 'C', 'D', 'E']

    array.randomizeCrypto(arr) // ['C', 'D', 'E', 'A', 'B']
    array.randomizeCrypto(arr) // ['E', 'A', 'C', 'B', 'D']

    Since

    1.12.12

    Supports

    nodejs, browser