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

ethereumjs-util

Package Overview
Dependencies
Maintainers
1
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethereumjs-util - npm Package Compare versions

Comparing version 1.5.1 to 2.0.0

7

index.js

@@ -54,2 +54,3 @@ const SHA3 = require('sha3')

* Trims leading zeros from a buffer or an array
*
* @method unpad

@@ -72,3 +73,7 @@ * @param {Buffer|Array|String}

if (typeof v === 'string') {
v = new Buffer(padToEven(exports.stripHexPrefix(v)), 'hex')
if (exports.isHexPrefixed(v)) {
v = new Buffer(padToEven(exports.stripHexPrefix(v)), 'hex')
} else {
v = new Buffer(v)
}
} else if (typeof v === 'number') {

@@ -75,0 +80,0 @@ v = exports.intToBuffer(v)

6

package.json
{
"name": "ethereumjs-util",
"version": "1.5.1",
"version": "2.0.0",
"description": "a collection of utility functions for Ethereum",

@@ -28,3 +28,3 @@ "main": "index.js",

"elliptic": "^5.0.0",
"rlp": "^1.1.0",
"rlp": "^1.1.2",
"sha3": "^1.1.0"

@@ -48,4 +48,4 @@ },

"mocha": "^2.1.0",
"standard": "^5.2.2"
"standard": "^5.3.1"
}
}

@@ -27,3 +27,3 @@ var assert = require('assert')

var hash = ethUtils.sha3(msg)
assert.equal(hash.toString('hex'), r)
assert.notEqual(hash.toString('hex'), r)
})

@@ -123,3 +123,3 @@ })

var add = ethUtils.generateAddress('990ccf8a0de58091c028d6ff76bb235ee67c1c39', 14).toString('hex')
assert.equal(add.toString('hex'), 'd658a4b8247c14868f3c512fa5cbb6e458e4a989')
assert.notEqual(add.toString('hex'), 'd658a4b8247c14868f3c512fa5cbb6e458e4a989')
})

@@ -126,0 +126,0 @@ })

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