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

dat-encoding

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dat-encoding - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

1

index.js

@@ -15,3 +15,4 @@ 'use strict'

exports.decode = function (str) {
if (str.length === 64) return Buffer.from(str, 'hex')
return Buffer.from(encoding.decode(str))
}

2

package.json
{
"name": "dat-encoding",
"version": "1.0.1",
"version": "1.1.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": "juliangruber/dat-encoding",

@@ -14,2 +14,9 @@ var test = require('tape')

t.deepEqual(enc.decode('42n3t'), Buffer('hey'))
var legacy = {
raw: Buffer('abcdabcdbacdbacdbacdbacdbacdbacd'),
encoded: '6162636461626364626163646261636462616364626163646261636462616364'
}
t.deepEqual(enc.decode(legacy.encoded), legacy.raw, 'legacy hex encoding')
t.end()

@@ -16,0 +23,0 @@ })

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