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 10.2.6 to 10.3.1

LICENSE

10

base64.js

@@ -12,2 +12,10 @@ // Copyright 2017-2023 @polkadot/x-randomvalues authors & contributors

const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
const map = new Uint8Array(256);
// We use charCodeAt for access here and in the decoder loop - this is faster
// on lookups (array + numbers) and also faster than accessing the specific
// character via data[i] (around a 50% improvement on perf tests)
for (let i = 0; i < chars.length; i++) {
map[chars.charCodeAt(i)] = i;
}
export function base64Decode(data) {

@@ -19,3 +27,3 @@ const bytes = [];

// each character represents 6 bits
byte = byte << 6 | chars.indexOf(data[i]);
byte = byte << 6 | map[data.charCodeAt(i)];

@@ -22,0 +30,0 @@ // each byte needs to contain 8 bits

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

const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
const map = new Uint8Array(256);
// We use charCodeAt for access here and in the decoder loop - this is faster
// on lookups (array + numbers) and also faster than accessing the specific
// character via data[i] (around a 50% improvement on perf tests)
for (let i = 0; i < chars.length; i++) {
map[chars.charCodeAt(i)] = i;
}
function base64Decode(data) {

@@ -25,3 +33,3 @@ const bytes = [];

// each character represents 6 bits
byte = byte << 6 | chars.indexOf(data[i]);
byte = byte << 6 | map[data.charCodeAt(i)];

@@ -28,0 +36,0 @@ // each byte needs to contain 8 bits

2

cjs/packageInfo.js

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

type: 'cjs',
version: '10.2.6'
version: '10.3.1'
};
exports.packageInfo = packageInfo;

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

"type": "module",
"version": "10.2.6",
"version": "10.3.1",
"main": "./cjs/node.js",

@@ -83,4 +83,4 @@ "module": "./node.js",

"dependencies": {
"@babel/runtime": "^7.20.7",
"@polkadot/x-global": "10.2.6"
"@babel/runtime": "^7.20.13",
"@polkadot/x-global": "10.3.1"
},

@@ -87,0 +87,0 @@ "denoDependencies": {

@@ -10,3 +10,3 @@ // Copyright 2017-2023 @polkadot/x-randomvalues authors & contributors

type: 'esm',
version: '10.2.6'
version: '10.3.1'
};

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

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