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

moderndash

Package Overview
Dependencies
Maintainers
1
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moderndash - npm Package Compare versions

Comparing version 3.7.1 to 3.7.2

13

dist/index.js

@@ -247,14 +247,11 @@ // src/array/chunk.ts

// src/crypto/randomFloat.ts
var shiftLeft20Bits = 2 ** 20;
var shiftRight52Bits = 2 ** -52;
function randomFloat(min, max) {
if (min >= max) {
if (min >= max)
throw new Error("max must be greater than min");
}
const range2 = max - min;
const randomBuffer = new Uint32Array(2);
crypto.getRandomValues(randomBuffer);
const mantissa = randomBuffer[0] * shiftLeft20Bits + (randomBuffer[1] >>> 12);
const randomFloat2 = mantissa * shiftRight52Bits;
return min + randomFloat2 * range2;
const randomBigInt = BigInt(randomBuffer[0]) << 20n | BigInt(randomBuffer[1]) >> 12n;
const maxNumber = 2 ** 52 - 1;
const fraction = Number(randomBigInt) / maxNumber;
return min + fraction * (max - min);
}

@@ -261,0 +258,0 @@

{
"name": "moderndash",
"version": "3.7.1",
"version": "3.7.2",
"type": "module",

@@ -5,0 +5,0 @@ "description": "A Typescript-First utility library inspired by Lodash. Optimized for modern browsers.",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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