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

math-random

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

math-random - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

browser.js

@@ -5,3 +5,3 @@ module.exports = (function (global) {

var rando = crypto && typeof crypto.getRandomValues === 'function'
var good = uint32 && crypto && rando
var good = uint32 && rando
if (!good) return Math.random

@@ -8,0 +8,0 @@

@@ -10,5 +10,5 @@ var crypto = require('crypto')

.randomBytes(4)
.toString('hex')
.readUInt32BE(0)
return parseInt(buf, 16) / max
return buf / max
}
{
"name": "math-random",
"version": "1.0.1",
"version": "1.0.2",
"description": "a drop-in replacement for Math.random that uses cryptographically secure random number generation, where available",

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

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