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

multiformats

Package Overview
Dependencies
Maintainers
1
Versions
154
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multiformats - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

2

index.js

@@ -102,3 +102,3 @@ const varints = require('varint')

const { decode } = get(prefix)
return decode(string)
return Uint8Array.from(decode(string))
}

@@ -105,0 +105,0 @@ const encoding = string => get(string[0])

{
"name": "multiformats",
"version": "0.0.3",
"version": "0.0.4",
"description": "Interface for multihash, multicodec, multibase and CID.",

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

@@ -34,2 +34,9 @@ /* globals describe, it */

})
test('pristine backing buffer', () => {
// some deepEqual() libraries go as deep as the backing buffer, make sure it's pristine
const string = multibase.encode(bytes.fromString('test'), base)
const buffer = multibase.decode(string)
const expected = bytes.fromString('test')
same(new Uint8Array(buffer.buffer).join(','), new Uint8Array(expected.buffer).join(','))
})
test('empty', () => {

@@ -36,0 +43,0 @@ const str = multibase.encode(bytes.fromString(''), base)

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