Socket
Socket
Sign inDemoInstall

web3-utils

Package Overview
Dependencies
Maintainers
4
Versions
442
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-utils - npm Package Compare versions

Comparing version 4.3.2-dev.2706805.0 to 4.3.2-dev.0b75589.0

19

lib/commonjs/formatter.js

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

}
if (baseType === 'string') {
return String(value);
}
}

@@ -232,3 +235,3 @@ catch (error) {

dataPath.push(key);
const schemaProp = findSchemaByDataPath(schema, dataPath, oneOfPath);
let schemaProp = findSchemaByDataPath(schema, dataPath, oneOfPath);
// If value is a scaler value

@@ -259,2 +262,16 @@ if ((0, web3_validator_1.isNullish)(schemaProp)) {

}
// The following code is basically saying:
// if the schema specifies oneOf, then we are to loop
// over each possible schema and check if they type of the schema specifies format
// and if so we use the oneOfSchemaProp as the schema for formatting
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
if (((schemaProp === null || schemaProp === void 0 ? void 0 : schemaProp.format) === undefined) && ((schemaProp === null || schemaProp === void 0 ? void 0 : schemaProp.oneOf) !== undefined)) {
for (const [_index, oneOfSchemaProp] of schemaProp.oneOf.entries()) {
if (((oneOfSchemaProp === null || oneOfSchemaProp === void 0 ? void 0 : oneOfSchemaProp.format) !== undefined)) {
schemaProp = oneOfSchemaProp;
break;
}
}
;
}
object[key] = (0, exports.convertScalarValue)(value, schemaProp.format, format);

@@ -261,0 +278,0 @@ dataPath.pop();

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

}
if (baseType === 'string') {
return String(value);
}
}

@@ -227,3 +230,3 @@ catch (error) {

dataPath.push(key);
const schemaProp = findSchemaByDataPath(schema, dataPath, oneOfPath);
let schemaProp = findSchemaByDataPath(schema, dataPath, oneOfPath);
// If value is a scaler value

@@ -254,2 +257,16 @@ if (isNullish(schemaProp)) {

}
// The following code is basically saying:
// if the schema specifies oneOf, then we are to loop
// over each possible schema and check if they type of the schema specifies format
// and if so we use the oneOfSchemaProp as the schema for formatting
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
if (((schemaProp === null || schemaProp === void 0 ? void 0 : schemaProp.format) === undefined) && ((schemaProp === null || schemaProp === void 0 ? void 0 : schemaProp.oneOf) !== undefined)) {
for (const [_index, oneOfSchemaProp] of schemaProp.oneOf.entries()) {
if (((oneOfSchemaProp === null || oneOfSchemaProp === void 0 ? void 0 : oneOfSchemaProp.format) !== undefined)) {
schemaProp = oneOfSchemaProp;
break;
}
}
;
}
object[key] = convertScalarValue(value, schemaProp.format, format);

@@ -256,0 +273,0 @@ dataPath.pop();

10

package.json
{
"name": "web3-utils",
"sideEffects": false,
"version": "4.3.2-dev.2706805.0+2706805",
"version": "4.3.2-dev.0b75589.0+0b75589",
"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.2.2-dev.2706805.0+2706805",
"web3-types": "1.7.1-dev.2706805.0+2706805",
"web3-validator": "2.0.7-dev.2706805.0+2706805"
"web3-errors": "1.3.1-dev.0b75589.0+0b75589",
"web3-types": "1.7.1-dev.0b75589.0+0b75589",
"web3-validator": "2.0.7-dev.0b75589.0+0b75589"
},
"gitHead": "270680596db7e8c2e0ee09148a042233a415c106"
"gitHead": "0b7558969cecfd7600be9a336ac7f157b6cf6c76"
}

@@ -134,2 +134,7 @@ /*

}
if (baseType === 'string') {
return String(value);
}
} catch (error) {

@@ -293,3 +298,3 @@ // If someone didn't use `eth` keyword we can return original value

dataPath.push(key);
const schemaProp = findSchemaByDataPath(schema, dataPath, oneOfPath);
let schemaProp = findSchemaByDataPath(schema, dataPath, oneOfPath);

@@ -327,2 +332,16 @@ // If value is a scaler value

// The following code is basically saying:
// if the schema specifies oneOf, then we are to loop
// over each possible schema and check if they type of the schema specifies format
// and if so we use the oneOfSchemaProp as the schema for formatting
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
if ((schemaProp?.format === undefined) && (schemaProp?.oneOf !== undefined)) {
for (const [_index, oneOfSchemaProp] of schemaProp.oneOf.entries()) {
if ((oneOfSchemaProp?.format !== undefined)) {
schemaProp = oneOfSchemaProp;
break;
}
};
}
object[key] = convertScalarValue(value, schemaProp.format as string, format);

@@ -329,0 +348,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

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