Commit a38d9f61 authored by mgabdev's avatar mgabdev

Added number util function for getRandomInt

• Added:
- number util function for getRandomInt
parent 4cb54447
......@@ -16,3 +16,9 @@ export const shortNumberFormat = (number) => {
</Fragment>
)
}
export const getRandomInt = (min, max) => {
min = Math.ceil(min)
max = Math.floor(max)
return Math.floor(Math.random() * (max - min + 1)) + min
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment