Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@polkadot/x-randomvalues

Package Overview
Dependencies
Maintainers
2
Versions
721
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polkadot/x-randomvalues - npm Package Compare versions

Comparing version 11.0.1 to 11.0.2

2

browser.d.ts

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

export { packageInfo } from './packageInfo';
export { packageInfo } from './packageInfo.js';
export declare function getRandomValues<T extends Uint8Array>(arr: T): T;

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

const x_global_1 = require("@polkadot/x-global");
var packageInfo_1 = require("./packageInfo");
Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_1.packageInfo; } });
var packageInfo_js_1 = require("./packageInfo.js");
Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_js_1.packageInfo; } });
function getRandomValues(arr) {

@@ -9,0 +9,0 @@ // We use x-global here - this prevents packagers such as rollup

@@ -6,4 +6,4 @@ "use strict";

const crypto_1 = tslib_1.__importDefault(require("crypto"));
var packageInfo_1 = require("./packageInfo");
Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_1.packageInfo; } });
var packageInfo_js_1 = require("./packageInfo.js");
Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_js_1.packageInfo; } });
function getRandomValues(output) {

@@ -10,0 +10,0 @@ const bytes = crypto_1.default.randomBytes(output.length);

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.packageInfo = void 0;
exports.packageInfo = { name: '@polkadot/x-randomvalues', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '11.0.1' };
exports.packageInfo = { name: '@polkadot/x-randomvalues', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '11.0.2' };

@@ -6,9 +6,9 @@ "use strict";

const x_global_1 = require("@polkadot/x-global");
const base64_1 = require("./base64");
const browser_1 = require("./browser");
const fallback_1 = require("./fallback");
var packageInfo_1 = require("./packageInfo");
Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_1.packageInfo; } });
const base64_js_1 = require("./base64.js");
const browser_js_1 = require("./browser.js");
const fallback_js_1 = require("./fallback.js");
var packageInfo_js_1 = require("./packageInfo.js");
Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_js_1.packageInfo; } });
function getRandomValuesNative(output) {
const bytes = (0, base64_1.base64Decode)(react_native_1.NativeModules.RNGetRandomValues
const bytes = (0, base64_js_1.base64Decode)(react_native_1.NativeModules.RNGetRandomValues
? react_native_1.NativeModules.RNGetRandomValues.getRandomBase64(output.length)

@@ -22,5 +22,5 @@ : react_native_1.NativeModules.ExpoRandom.getRandomBase64String(output.length));

exports.getRandomValues = (typeof x_global_1.xglobal.crypto === 'object' && typeof x_global_1.xglobal.crypto.getRandomValues === 'function'
? browser_1.getRandomValues
? browser_js_1.getRandomValues
: (typeof x_global_1.xglobal.nativeCallSyncHook === 'undefined' || !react_native_1.NativeModules.ExpoRandom)
? fallback_1.insecureRandomValues
? fallback_js_1.insecureRandomValues
: getRandomValuesNative);

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

export { packageInfo } from './packageInfo';
export { packageInfo } from './packageInfo.js';
export declare function getRandomValues<T extends Uint8Array>(output: T): T;

@@ -20,3 +20,3 @@ {

"type": "module",
"version": "11.0.1",
"version": "11.0.2",
"main": "./cjs/node.js",

@@ -86,3 +86,3 @@ "module": "./node.js",

"dependencies": {
"@polkadot/x-global": "11.0.1",
"@polkadot/x-global": "11.0.2",
"tslib": "^2.5.0"

@@ -89,0 +89,0 @@ },

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

export const packageInfo = { name: '@polkadot/x-randomvalues', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '11.0.1' };
export const packageInfo = { name: '@polkadot/x-randomvalues', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '11.0.2' };

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

import { getRandomValues as getRandomValuesGlobal } from './browser';
export { packageInfo } from './packageInfo';
import { getRandomValues as getRandomValuesGlobal } from './browser.js';
export { packageInfo } from './packageInfo.js';
export declare const getRandomValues: typeof getRandomValuesGlobal;
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