Skip to content

Commit

Permalink
feat: added generate random number functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
bhattabhi013 committed Oct 16, 2022
1 parent cc0477e commit f2eef4c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions package/index.js
Expand Up @@ -137,6 +137,11 @@ function percentage(partialValue, totalValue) {
return (100 * partialValue) / totalValue;
}

// generate random number
function getRandom() {
return Math.floor(Math.random() * 1000);
}

// Export functions
module.exports = {
doAdd,
Expand All @@ -149,6 +154,7 @@ module.exports = {
doMod,
root,
percentage,
getRandom,
calcAge,
calcLoan,
timeCalc,
Expand Down

0 comments on commit f2eef4c

Please sign in to comment.