Get a random value of an Array with crypto
import { array } from "@rjweb/utils"const arr = ['A', 'B', 'C', 'D', 'E']array.randomCrypto(arr, 2) // 'C'array.randomCrypto(arr, 4) // 'A' Copy
import { array } from "@rjweb/utils"const arr = ['A', 'B', 'C', 'D', 'E']array.randomCrypto(arr, 2) // 'C'array.randomCrypto(arr, 4) // 'A'
1.12.12
nodejs, browser
Get a random value of an Array with crypto