Socket
Socket
Sign inDemoInstall

multiformats

Package Overview
Dependencies
Maintainers
1
Versions
153
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.1 to 0.0.2

1

cid.js

@@ -67,2 +67,3 @@ 'use strict'

;[code, cid] = parse(cid)
if (code > 1) throw new Error(`Invalid CID version ${code}`)
readonly(this, 'version', code)

@@ -69,0 +70,0 @@ ;[code, cid] = parse(cid)

2

package.json
{
"name": "multiformats",
"version": "0.0.1",
"version": "0.0.2",
"description": "Interface for multihash, multicodec, multibase and CID.",

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

@@ -29,3 +29,3 @@ /* globals before, describe, it */

describe('CID', () => {
const { CID, multihash, multibase } = require('../basics')
const { CID, multihash, multibase, varint } = require('../basics')
multibase.add(require('../bases/base58'))

@@ -364,2 +364,7 @@ multibase.add(require('../bases/base32'))

})
test('invalid CID version', async () => {
const encoded = varint.encode(18)
await testThrow(() => new CID(encoded), 'Invalid CID version 18')
})
})
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