Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

web3-utils

Package Overview
Dependencies
Maintainers
3
Versions
487
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 1.3.0 to 1.3.1

1

lib/index.js

@@ -380,2 +380,3 @@ /*

toUtf8: utils.hexToUtf8,
stripHexPrefix: utils.stripHexPrefix,
utf8ToHex: utils.utf8ToHex,

@@ -382,0 +383,0 @@ stringToHex: utils.utf8ToHex,

@@ -339,2 +339,14 @@ /*

/**
* Remove 0x prefix from string
*
* @method stripHexPrefix
* @param {String} str to be checked
* @returns {String}
*/
var stripHexPrefix = function (str) {
if (str !== 0 && isHex(str))
return str.replace(/^(-)?0x/i, '$1');
return str;
};
/**
* Returns true if given string is a valid Ethereum block header bloom.

@@ -470,2 +482,3 @@ *

isHexStrict: isHexStrict,
stripHexPrefix: stripHexPrefix,
leftPad: leftPad,

@@ -472,0 +485,0 @@ rightPad: rightPad,

4

package.json
{
"name": "web3-utils",
"version": "1.3.0",
"version": "1.3.1",
"description": "Collection of utility functions used in web3.js.",

@@ -30,3 +30,3 @@ "repository": "https://github.com/ethereum/web3.js/tree/1.x/packages/web3-utils",

},
"gitHead": "a88944fff1f62b2b6f00e3de52446d24d9e92cc6"
"gitHead": "1a850aec1d8fa86bfacef1f3ffe71839b87e78e7"
}

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

toUtf8: utils.hexToUtf8,
stripHexPrefix: utils.stripHexPrefix,

@@ -416,0 +417,0 @@ utf8ToHex: utils.utf8ToHex,

@@ -391,2 +391,14 @@ /*

/**
* Remove 0x prefix from string
*
* @method stripHexPrefix
* @param {String} str to be checked
* @returns {String}
*/
var stripHexPrefix = function (str) {
if (str !== 0 && isHex(str))
return str.replace(/^(-)?0x/i, '$1')
return str;
};

@@ -538,2 +550,3 @@ /**

isHexStrict: isHexStrict,
stripHexPrefix: stripHexPrefix,
leftPad: leftPad,

@@ -540,0 +553,0 @@ rightPad: rightPad,

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