index.ts 231 Bytes Edit Raw Blame History Permalink 1 2 3 4 5 6 7 export function randomInt(min: number, max: number): number { return Math.floor(Math.random() * (max - min + 1)) + min } export function randomFrom<T>(array: T[]): T { return array[Math.floor(Math.random() * array.length)]! }