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

@polkadot/util

Package Overview
Dependencies
Maintainers
1
Versions
1412
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polkadot/util - npm Package Compare versions

Comparing version 0.19.5 to 0.19.6

4

is/hex.js

@@ -12,3 +12,3 @@ 'use strict';

@name isHex
@signature isHex (value: string, bitLength: number = -1): boolean
@signature isHex (value: mixed, bitLength: number = -1): boolean
@summary Tests for a hex string.

@@ -26,5 +26,7 @@ @description

// $FlowFixMe for the regex we have a string
var isValidHex = value === '0x' || isString(value) && HEX_REGEX.test(value);
if (isValidHex && bitLength !== -1) {
// $FlowFixMe type is a string as checked above
return value.length === 2 + bitLength / 4;

@@ -31,0 +33,0 @@ }

{
"name": "@polkadot/util",
"version": "0.19.5",
"version": "0.19.6",
"description": "A collection of useful utilities for @polkadot",

@@ -32,3 +32,3 @@ "main": "index.js",

"devDependencies": {
"@polkadot/api-jsonrpc": "^0.9.15"
"@polkadot/api-jsonrpc": "^0.10.2"
},

@@ -35,0 +35,0 @@ "dependencies": {

@@ -23,2 +23,3 @@ "use strict";

var bitLength = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : -1;
var atStart = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;

@@ -37,5 +38,9 @@ var byteLength = Math.ceil(bitLength / 8);

result.set(value, byteLength - value.length);
if (atStart) {
result.set(value, 0);
} else {
result.set(value, byteLength - value.length);
}
return result;
};

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc