web3-utils
Advanced tools
Comparing version 1.0.0-beta.55 to 2.0.0-alpha
@@ -114,2 +114,5 @@ 'use strict'; | ||
if (!value) return value; | ||
if (isString(value)) { | ||
if (!isHexStrict(value)) throw new Error("Given value \"".concat(value, "\" is not a valid hex string.")); | ||
} | ||
return toBN(value).toString(10); | ||
@@ -534,2 +537,3 @@ }; | ||
var stripHexPrefix$1 = stripHexPrefix; | ||
var isBigNumber$1 = isBigNumber; | ||
@@ -554,2 +558,3 @@ exports.BN = BN; | ||
exports.isBN = isBN$1; | ||
exports.isBigNumber = isBigNumber$1; | ||
exports.isBloom = isBloom$1; | ||
@@ -556,0 +561,0 @@ exports.isHex = isHex$1; |
@@ -106,2 +106,5 @@ import isObject from 'lodash/isObject'; | ||
if (!value) return value; | ||
if (isString(value)) { | ||
if (!isHexStrict(value)) throw new Error(`Given value "${value}" is not a valid hex string.`); | ||
} | ||
return toBN(value).toString(10); | ||
@@ -522,3 +525,4 @@ }; | ||
const stripHexPrefix$1 = stripHexPrefix; | ||
const isBigNumber$1 = isBigNumber; | ||
export { asciiToHex, bytesToHex$1 as bytesToHex, checkAddressChecksum$1 as checkAddressChecksum, fromAscii, fromDecimal, fromUtf8, fromWei, getSignatureParameters$1 as getSignatureParameters, getUnitValue, hexToAscii, hexToBytes$1 as hexToBytes, hexToNumber$1 as hexToNumber, hexToNumberString$1 as hexToNumberString, hexToString, hexToUtf8$1 as hexToUtf8, isAddress$1 as isAddress, isBN$1 as isBN, isBloom$1 as isBloom, isHex$1 as isHex, isHexStrict$1 as isHexStrict, isTopic$1 as isTopic, jsonInterfaceMethodToString, keccak256$1 as keccak256, numberToHex$1 as numberToHex, padLeft, padRight, randomHex, sha3, soliditySha3, stringToHex, stripHexPrefix$1 as stripHexPrefix, toAscii, toBN$1 as toBN, toChecksumAddress, toDecimal, toHex$1 as toHex, toTwosComplement$1 as toTwosComplement, toUtf8, toWei, utf8ToHex$1 as utf8ToHex }; | ||
export { asciiToHex, bytesToHex$1 as bytesToHex, checkAddressChecksum$1 as checkAddressChecksum, fromAscii, fromDecimal, fromUtf8, fromWei, getSignatureParameters$1 as getSignatureParameters, getUnitValue, hexToAscii, hexToBytes$1 as hexToBytes, hexToNumber$1 as hexToNumber, hexToNumberString$1 as hexToNumberString, hexToString, hexToUtf8$1 as hexToUtf8, isAddress$1 as isAddress, isBN$1 as isBN, isBigNumber$1 as isBigNumber, isBloom$1 as isBloom, isHex$1 as isHex, isHexStrict$1 as isHexStrict, isTopic$1 as isTopic, jsonInterfaceMethodToString, keccak256$1 as keccak256, numberToHex$1 as numberToHex, padLeft, padRight, randomHex, sha3, soliditySha3, stringToHex, stripHexPrefix$1 as stripHexPrefix, toAscii, toBN$1 as toBN, toChecksumAddress, toDecimal, toHex$1 as toHex, toTwosComplement$1 as toTwosComplement, toUtf8, toWei, utf8ToHex$1 as utf8ToHex }; |
@@ -113,2 +113,5 @@ (function (global, factory) { | ||
if (!value) return value; | ||
if (isString(value)) { | ||
if (!isHexStrict(value)) throw new Error("Given value \"".concat(value, "\" is not a valid hex string.")); | ||
} | ||
return toBN(value).toString(10); | ||
@@ -533,2 +536,3 @@ }; | ||
var stripHexPrefix$1 = stripHexPrefix; | ||
var isBigNumber$1 = isBigNumber; | ||
@@ -553,2 +557,3 @@ exports.BN = BN; | ||
exports.isBN = isBN$1; | ||
exports.isBigNumber = isBigNumber$1; | ||
exports.isBloom = isBloom$1; | ||
@@ -555,0 +560,0 @@ exports.isHex = isHex$1; |
{ | ||
"name": "web3-utils", | ||
"namespace": "ethereum", | ||
"version": "1.0.0-beta.55", | ||
"version": "2.0.0-alpha", | ||
"description": "Collection of utility functions used in web3.js.", | ||
"repository": "https://github.com/ethereum/web3.js/tree/1.0/packages/web3-utils", | ||
"license": "LGPL-3.0", | ||
"engines": { | ||
"node": ">=8.0.0" | ||
}, | ||
"main": "dist/web3-utils.cjs.js", | ||
@@ -21,3 +24,3 @@ "module": "dist/web3-utils.esm.js", | ||
"@types/bn.js": "^4.11.4", | ||
"@types/node": "^10.12.18", | ||
"@types/node": "^12.6.1", | ||
"bn.js": "4.11.8", | ||
@@ -40,3 +43,3 @@ "eth-lib": "0.2.8", | ||
], | ||
"gitHead": "37347fd46344f45d1c57104920bdda0779f0d51c" | ||
"gitHead": "a09d2cc84c1f08aa673028cc7c517d40a1f72972" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
73119
1884
+ Added@types/node@12.20.55(transitive)
- Removed@types/node@10.17.60(transitive)
Updated@types/node@^12.6.1