New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

utilsac

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

utilsac - npm Package Compare versions

Comparing version 6.1.0 to 7.0.0

2

package.json
{
"name": "utilsac",
"version": "6.1.0",
"version": "7.0.0",
"description": "JavaScript General Purpose Utility Functions",

@@ -5,0 +5,0 @@ "main": "files.js",

export {
randomInt
randomPositiveInt,
randomInt,
randomFloat
};

@@ -9,8 +11,34 @@

@param {uint} maxExclusive
@return {uint} random positive integer
*/
const randomPositiveInt = function (maxExclusive = 2) {
return Math.floor(Math.random() * maxExclusive);
};
/**
Returns a random integer between minInclusive (included) and
maxExlusive (excluded)
@param {int} maxExclusive
@param {int} maxExclusive
@return {int} random integer
*/
const randomInt = function (maxExclusive = 2) {
return Math.floor(Math.random() * maxExclusive);
const randomInt = function (minInclusive = 0, maxExclusive = 2) {
return minInclusive + Math.floor(Math.random() * (maxExclusive - minInclusive));
};
/**
Returns a random number between minInclusive (included) and
maxExlusive (excluded)
@param {number} maxExclusive
@param {number} maxExclusive
@return {number} random number
*/
const randomFloat = function (minInclusive = 0, maxExclusive = 1) {
return minInclusive + (Math.random() * (maxExclusive - minInclusive));
};
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