๐Ÿ“ฆ directus / website

๐Ÿ“„ randomInteger.ts ยท 6 lines
1
2
3
4
5
6/**
 * Get a random number between min and max
 */
export const randomInt = (min: number, max: number) =>
	Math.floor(Math.random() * (Math.floor(max) - Math.ceil(min) + 1) + Math.ceil(min));