Socket
Socket
Sign inDemoInstall

web3-utils

Package Overview
Dependencies
7
Maintainers
4
Versions
409
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.2.2-dev.a1f9dc4.0 to 4.2.2-dev.a83e9d5.0

7

lib/commonjs/converters.js

@@ -368,2 +368,9 @@ "use strict";

if (typeof value === 'number') {
if (value > 1e+20) {
// JavaScript converts numbers >= 10^21 to scientific notation when coerced to strings,
// leading to potential parsing errors and incorrect representations.
// For instance, String(10000000000000000000000) yields '1e+22'.
// Using BigInt prevents this
return BigInt(value);
}
return value;

@@ -370,0 +377,0 @@ }

@@ -353,2 +353,9 @@ /*

if (typeof value === 'number') {
if (value > 1e+20) {
// JavaScript converts numbers >= 10^21 to scientific notation when coerced to strings,
// leading to potential parsing errors and incorrect representations.
// For instance, String(10000000000000000000000) yields '1e+22'.
// Using BigInt prevents this
return BigInt(value);
}
return value;

@@ -355,0 +362,0 @@ }

10

package.json
{
"name": "web3-utils",
"sideEffects": false,
"version": "4.2.2-dev.a1f9dc4.0+a1f9dc4",
"version": "4.2.2-dev.a83e9d5.0+a83e9d5",
"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.a1f9dc4.0+a1f9dc4",
"web3-types": "1.5.1-dev.a1f9dc4.0+a1f9dc4",
"web3-validator": "2.0.5-dev.a1f9dc4.0+a1f9dc4"
"web3-errors": "1.1.5-dev.a83e9d5.0+a83e9d5",
"web3-types": "1.5.1-dev.a83e9d5.0+a83e9d5",
"web3-validator": "2.0.5-dev.a83e9d5.0+a83e9d5"
},
"gitHead": "a1f9dc4a793d9e151cb63f0229bd9c32f772a58a"
"gitHead": "a83e9d57ffe318331e820d307afe6f179a759225"
}

@@ -414,2 +414,9 @@ /*

if (typeof value === 'number') {
if (value > 1e+20) {
// JavaScript converts numbers >= 10^21 to scientific notation when coerced to strings,
// leading to potential parsing errors and incorrect representations.
// For instance, String(10000000000000000000000) yields '1e+22'.
// Using BigInt prevents this
return BigInt(value);
}
return value;

@@ -416,0 +423,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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc