mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-23 00:06:15 -04:00
feat(tool): lorem ipsum generator
This commit is contained in:
parent
619deae438
commit
7735644e05
2 changed files with 113 additions and 0 deletions
8
utils/random.ts
Normal file
8
utils/random.ts
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue