UNPKG

@prelude/array

Version:

Array module.

8 lines 231 B
import randomIndex from './random-index.js'; /** * @returns random element. * @throws if array is empty. */ const sample = (values) => values[randomIndex(values.length)]; export default sample; //# sourceMappingURL=sample.js.map