Files
artcraft/packages/components/src/utils/GetRandomArrayValue.ts
T
Brandon Thomas b3f4477dd2 Fix for Vocodes v1 removal
Mistakenly deleted files with function still in use
2022-07-10 02:05:53 -04:00

7 lines
180 B
TypeScript

import { GetRandomInt } from "./GetRandomInt";
export function GetRandomArrayValue<T>(array: Array<T>) : T {
let index = GetRandomInt(0, array.length);
return array[index];
}