Socket
Socket
Sign inDemoInstall

rjutils-collection

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rjutils-collection - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

2

package.json
{
"name": "rjutils-collection",
"version": "1.0.5",
"version": "1.0.6",
"description": "Easy and Lightweight Utilities",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -29,8 +29,11 @@ const path = require('path')

* @param {Number} max The Maximum Number
* @param {Number} [dec] The Decimal Places to Generate
*/
randomNum(min, max) {
randomNum(min, max, dec) {
if (typeof min !== 'number') throw new TypeError('minimum must be a number')
if (typeof max !== 'number') throw new TypeError('maximum must be a number')
dec = dec || 0
const number = Math.floor(Math.random() * (max - min + 1)) + min
const random = Math.random() * (max - min + 1) + min
const number = Math.floor(random * (10 ** dec)) / (10 ** dec);
return number

@@ -37,0 +40,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc