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

pure-rand

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pure-rand - npm Package Compare versions

Comparing version 4.1.2 to 5.0.0-experimental.4.1.2.0

22

lib/esm/generator/XorShift.js

@@ -15,2 +15,7 @@ var XorShift128Plus = (function () {

XorShift128Plus.prototype.next = function () {
var nextRng = new XorShift128Plus(this.s01, this.s00, this.s11, this.s10);
var out = nextRng.unsafeNext();
return [out, nextRng];
};
XorShift128Plus.prototype.unsafeNext = function () {
var a0 = this.s00 ^ (this.s00 << 23);

@@ -20,6 +25,11 @@ var a1 = this.s01 ^ ((this.s01 << 23) | (this.s00 >>> 9));

var b1 = a1 ^ this.s11 ^ (a1 >>> 18) ^ (this.s11 >>> 5);
return [(this.s00 + this.s10) | 0, new XorShift128Plus(this.s11, this.s10, b1, b0)];
var out = (this.s00 + this.s10) | 0;
this.s01 = this.s11;
this.s00 = this.s10;
this.s11 = b1;
this.s10 = b0;
return out;
};
XorShift128Plus.prototype.jump = function () {
var rngRunner = this;
var rngRunner = new XorShift128Plus(this.s01, this.s00, this.s11, this.s10);
var ns01 = 0;

@@ -38,6 +48,10 @@ var ns00 = 0;

}
rngRunner = rngRunner.next()[1];
rngRunner.unsafeNext();
}
}
return new XorShift128Plus(ns01, ns00, ns11, ns10);
rngRunner.s01 = ns01;
rngRunner.s00 = ns00;
rngRunner.s11 = ns11;
rngRunner.s10 = ns10;
return rngRunner;
};

@@ -44,0 +58,0 @@ return XorShift128Plus;

4

lib/esm/pure-rand-default.js

@@ -10,4 +10,4 @@ import { generateN, skipN } from './generator/RandomGenerator.js';

var __type = 'module';
var __version = '4.1.2';
var __commitHash = '30bd5a9d5c20a1e998e489e3e00125edbc60b973';
var __version = '5.0.0-experimental.4.1.2.0';
var __commitHash = 'dba3431a7ecc95f2d2def4c250460482d5fb7844';
export { __type, __version, __commitHash, generateN, skipN, congruential, congruential32, mersenne, xorshift128plus, xoroshiro128plus, uniformArrayIntDistribution, uniformBigIntDistribution, uniformIntDistribution, };

@@ -18,2 +18,7 @@ "use strict";

XorShift128Plus.prototype.next = function () {
var nextRng = new XorShift128Plus(this.s01, this.s00, this.s11, this.s10);
var out = nextRng.unsafeNext();
return [out, nextRng];
};
XorShift128Plus.prototype.unsafeNext = function () {
var a0 = this.s00 ^ (this.s00 << 23);

@@ -23,6 +28,11 @@ var a1 = this.s01 ^ ((this.s01 << 23) | (this.s00 >>> 9));

var b1 = a1 ^ this.s11 ^ (a1 >>> 18) ^ (this.s11 >>> 5);
return [(this.s00 + this.s10) | 0, new XorShift128Plus(this.s11, this.s10, b1, b0)];
var out = (this.s00 + this.s10) | 0;
this.s01 = this.s11;
this.s00 = this.s10;
this.s11 = b1;
this.s10 = b0;
return out;
};
XorShift128Plus.prototype.jump = function () {
var rngRunner = this;
var rngRunner = new XorShift128Plus(this.s01, this.s00, this.s11, this.s10);
var ns01 = 0;

@@ -41,6 +51,10 @@ var ns00 = 0;

}
rngRunner = rngRunner.next()[1];
rngRunner.unsafeNext();
}
}
return new XorShift128Plus(ns01, ns00, ns11, ns10);
rngRunner.s01 = ns01;
rngRunner.s00 = ns00;
rngRunner.s11 = ns11;
rngRunner.s10 = ns10;
return rngRunner;
};

@@ -47,0 +61,0 @@ return XorShift128Plus;

@@ -24,5 +24,5 @@ "use strict";

exports.__type = __type;
var __version = '4.1.2';
var __version = '5.0.0-experimental.4.1.2.0';
exports.__version = __version;
var __commitHash = '30bd5a9d5c20a1e998e489e3e00125edbc60b973';
var __commitHash = 'dba3431a7ecc95f2d2def4c250460482d5fb7844';
exports.__commitHash = __commitHash;
{
"name": "pure-rand",
"version": "4.1.2",
"version": "5.0.0-experimental.4.1.2.0",
"description": " Pure random number generator written in TypeScript",

@@ -5,0 +5,0 @@ "type": "commonjs",

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