MCPcopy Create free account
hub / github.com/dfinity/cancan / sample

Function sample

scripts/seed.ts:228–230  ·  view source on GitHub ↗
(array)

Source from the content-addressed store, hash-verified

226 return Math.floor(Math.random() * num);
227}
228function sample(array) {
229 return array[randomize(array.length)];
230}
231function multiSample(array) {
232 const tempArray = [...array];
233 const numToRemove = randomize(array.length);

Callers 1

createVideoFunction · 0.85

Calls 1

randomizeFunction · 0.85

Tested by

no test coverage detected