Socket
Socket
Sign inDemoInstall

@ethersproject/random

Package Overview
Dependencies
2
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.5.0 to 5.5.1

2

lib.esm/_version.d.ts

@@ -1,2 +0,2 @@

export declare const version = "random/5.5.0";
export declare const version = "random/5.5.1";
//# sourceMappingURL=_version.d.ts.map

@@ -1,2 +0,2 @@

export const version = "random/5.5.0";
export const version = "random/5.5.1";
//# sourceMappingURL=_version.js.map

@@ -8,20 +8,17 @@ "use strict";

//const window = { crypto: { getRandomValues: () => { } } };
let anyGlobal = null;
try {
anyGlobal = window;
if (anyGlobal == null) {
throw new Error("try next");
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis
function getGlobal() {
if (typeof self !== 'undefined') {
return self;
}
}
catch (error) {
try {
anyGlobal = global;
if (anyGlobal == null) {
throw new Error("try next");
}
if (typeof window !== 'undefined') {
return window;
}
catch (error) {
anyGlobal = {};
if (typeof global !== 'undefined') {
return global;
}
throw new Error('unable to locate global object');
}
;
const anyGlobal = getGlobal();
let crypto = anyGlobal.crypto || anyGlobal.msCrypto;

@@ -28,0 +25,0 @@ if (!crypto || !crypto.getRandomValues) {

@@ -1,2 +0,2 @@

export declare const version = "random/5.5.0";
export declare const version = "random/5.5.1";
//# sourceMappingURL=_version.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
exports.version = "random/5.5.0";
exports.version = "random/5.5.1";
//# sourceMappingURL=_version.js.map

@@ -10,20 +10,17 @@ "use strict";

//const window = { crypto: { getRandomValues: () => { } } };
var anyGlobal = null;
try {
anyGlobal = window;
if (anyGlobal == null) {
throw new Error("try next");
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis
function getGlobal() {
if (typeof self !== 'undefined') {
return self;
}
}
catch (error) {
try {
anyGlobal = global;
if (anyGlobal == null) {
throw new Error("try next");
}
if (typeof window !== 'undefined') {
return window;
}
catch (error) {
anyGlobal = {};
if (typeof global !== 'undefined') {
return global;
}
throw new Error('unable to locate global object');
}
;
var anyGlobal = getGlobal();
var crypto = anyGlobal.crypto || anyGlobal.msCrypto;

@@ -30,0 +27,0 @@ if (!crypto || !crypto.getRandomValues) {

@@ -25,3 +25,3 @@ {

],
"gitHead": "73a46efea32c3f9a4833ed77896a216e3d3752a0",
"gitHead": "28f383300c0d79b9de2dc0c52a7ef335f3e28d33",
"keywords": [

@@ -48,5 +48,5 @@ "Ethereum",

"sideEffects": false,
"tarballHash": "0x7aa2c8778d5c2cf19a3051d6ff38c0655923b5024158c727d92a08033b9f6845",
"tarballHash": "0xd86bc70a8ab1aee5abed32106f2ee9a1e16f27a0a04264596ce69927a95a5681",
"types": "./lib/index.d.ts",
"version": "5.5.0"
"version": "5.5.1"
}

@@ -1,1 +0,1 @@

export const version = "random/5.5.0";
export const version = "random/5.5.1";

@@ -12,15 +12,12 @@ "use strict";

let anyGlobal: any = null;
try {
anyGlobal = (window as any);
if (anyGlobal == null) { throw new Error("try next"); }
} catch (error) {
try {
anyGlobal = (global as any);
if (anyGlobal == null) { throw new Error("try next"); }
} catch (error) {
anyGlobal = { };
}
}
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis
function getGlobal(): any {
if (typeof self !== 'undefined') { return self; }
if (typeof window !== 'undefined') { return window; }
if (typeof global !== 'undefined') { return global; }
throw new Error('unable to locate global object');
};
const anyGlobal = getGlobal();
let crypto: any = anyGlobal.crypto || anyGlobal.msCrypto;

@@ -27,0 +24,0 @@ if (!crypto || !crypto.getRandomValues) {

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc