feat(tool): lorem ipsum generator

This commit is contained in:
Corentin Thomasset 2021-05-17 21:20:28 +02:00
parent 619deae438
commit 7735644e05
No known key found for this signature in database
GPG key ID: DBD997E935996158
2 changed files with 113 additions and 0 deletions

8
utils/random.ts Normal file
View file

@ -0,0 +1,8 @@
const randFromArray = (array: any[]) => array[Math.floor(Math.random() * array.length)]
const randIntFromInterval = (min: number, max: number) => Math.floor(Math.random() * (max - min) + min)
export {
randFromArray,
randIntFromInterval
}