Moe-Counter/utils/index.js
2024-10-30 16:06:09 +08:00

9 lines
196 B
JavaScript

module.exports = {
randomArray: (arr) => {
return arr[Math.floor(Math.random() * arr.length)]
},
toFixed: (num, digits = 2) => {
return parseFloat(Number(num).toFixed(digits))
}
}