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

normalize-hex

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

normalize-hex - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

1

example/example.js

@@ -7,1 +7,2 @@ const normalizeHex = require('normalize-hex')

console.log(normalizeHex('abc', { evenLength: true, addPrefix: true })) // '0x0abc'
console.log(normalizeHex('0xabc')) // 'abc'

2

package.json
{
"name": "normalize-hex",
"version": "0.0.1",
"version": "0.0.2",
"description": "Normalize a hex string",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -23,2 +23,3 @@ # normalize-hex

console.log(normalizeHex('abc', { evenLength: true, addPrefix: true })) // '0x0abc'
console.log(normalizeHex('0xabc')) // 'abc'
```

@@ -25,0 +26,0 @@

@@ -5,3 +5,3 @@ const test = require('tape')

test('normalizeHex', t => {
t.plan(16)
t.plan(17)

@@ -24,2 +24,3 @@ t.equal(normalizeHex(), '')

t.equal(normalizeHex('abc', { evenLength: true, addPrefix: true }), '0x0abc')
t.equal(normalizeHex('0xabc'), 'abc')
})
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