Socket
Socket
Sign inDemoInstall

web3-utils

Package Overview
Dependencies
34
Maintainers
4
Versions
398
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.2.3-dev.ce59737.0 to 4.2.3

3

lib/commonjs/converters.js

@@ -323,2 +323,5 @@ "use strict";

}
if ((0, uint8array_js_1.isUint8Array)(value)) {
return returnType ? 'bytes' : (0, exports.bytesToHex)(value);
}
if (typeof value === 'object' && !!value) {

@@ -325,0 +328,0 @@ return returnType ? 'string' : (0, exports.utf8ToHex)(JSON.stringify(value));

5

lib/commonjs/uint8array.js

@@ -21,5 +21,6 @@ "use strict";

function isUint8Array(data) {
var _a;
var _a, _b;
return (data instanceof Uint8Array ||
((_a = data === null || data === void 0 ? void 0 : data.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Uint8Array');
((_a = data === null || data === void 0 ? void 0 : data.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Uint8Array' ||
((_b = data === null || data === void 0 ? void 0 : data.constructor) === null || _b === void 0 ? void 0 : _b.name) === 'Buffer');
}

@@ -26,0 +27,0 @@ exports.isUint8Array = isUint8Array;

@@ -309,2 +309,5 @@ /*

}
if (isUint8Array(value)) {
return returnType ? 'bytes' : bytesToHex(value);
}
if (typeof value === 'object' && !!value) {

@@ -311,0 +314,0 @@ return returnType ? 'string' : utf8ToHex(JSON.stringify(value));

@@ -18,5 +18,6 @@ /*

export function isUint8Array(data) {
var _a;
var _a, _b;
return (data instanceof Uint8Array ||
((_a = data === null || data === void 0 ? void 0 : data.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Uint8Array');
((_a = data === null || data === void 0 ? void 0 : data.constructor) === null || _a === void 0 ? void 0 : _a.name) === 'Uint8Array' ||
((_b = data === null || data === void 0 ? void 0 : data.constructor) === null || _b === void 0 ? void 0 : _b.name) === 'Buffer');
}

@@ -23,0 +24,0 @@ export function uint8ArrayConcat(...parts) {

{
"name": "web3-utils",
"sideEffects": false,
"version": "4.2.3-dev.ce59737.0+ce59737",
"version": "4.2.3",
"description": "Collection of utility functions used in web3.js.",

@@ -68,7 +68,7 @@ "main": "./lib/commonjs/index.js",

"eventemitter3": "^5.0.1",
"web3-errors": "1.1.5-dev.ce59737.0+ce59737",
"web3-types": "1.5.1-dev.ce59737.0+ce59737",
"web3-validator": "2.0.6-dev.ce59737.0+ce59737"
"web3-errors": "^1.1.4",
"web3-types": "^1.6.0",
"web3-validator": "^2.0.5"
},
"gitHead": "ce5973719a598352831d871b4de167c363c4517f"
"gitHead": "93eeccb96d7bcddfa49ed4c4848dbf55b825546c"
}

@@ -365,2 +365,6 @@ /*

if(isUint8Array(value)) {
return returnType ? 'bytes' : bytesToHex(value);
}
if (typeof value === 'object' && !!value) {

@@ -367,0 +371,0 @@ return returnType ? 'string' : utf8ToHex(JSON.stringify(value));

@@ -21,3 +21,4 @@ /*

data instanceof Uint8Array ||
(data as { constructor: { name: string } })?.constructor?.name === 'Uint8Array'
(data as { constructor: { name: string } })?.constructor?.name === 'Uint8Array' ||
(data as { constructor: { name: string } })?.constructor?.name === 'Buffer'
);

@@ -24,0 +25,0 @@ }

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

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