MCPcopy Create free account
hub / github.com/CammyLeone/devious-buttplug / selectRandom

Function selectRandom

goon-client/src/AsyncGoon.js:3–3  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

1import React from "react";
2
3const selectRandom = (array) => array[Math.floor(Math.random() * array.length)];
4const selectRandomSlice = (size) => (array) => {
5 const slice = [];
6 while (slice.length < size && slice.length < array.length) {

Callers 1

selectRandomSliceFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected