New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ipld/block

Package Overview
Dependencies
Maintainers
3
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ipld/block - npm Package Compare versions

Comparing version 2.1.4 to 2.2.0

7

index.js

@@ -119,2 +119,9 @@ 'use strict'

}
async equals (block) {
if (block === this) return true
const cid = await this.cid()
if (CID.isCID(block)) return cid.equals(block)
return cid.equals(await block.cid())
}
}

@@ -121,0 +128,0 @@

2

package.json
{
"name": "@ipld/block",
"version": "2.1.4",
"version": "2.2.0",
"main": "index.js",

@@ -5,0 +5,0 @@ "directories": {

# Block API
![239441](https://img.shields.io/badge/compiled%20bundle-239k-yellow) ![72415](https://img.shields.io/badge/gzipped%20bundle-72k-yellowgreen)
![239684](https://img.shields.io/badge/compiled%20bundle-240k-yellow) ![72291](https://img.shields.io/badge/gzipped%20bundle-72k-yellowgreen)

@@ -5,0 +5,0 @@ The `Block` API is the single endpoint for authoring IPLD data structures. Unless you're

@@ -142,1 +142,11 @@ 'use strict'

})
test('block equals', async () => {
const block1 = Block.encoder({ hello: 'world' }, 'dag-cbor')
const block2 = Block.encoder({ hello: 'world' }, 'dag-cbor')
const block3 = Block.encoder('hello world', 'dag-cbor')
same(await block1.equals(block1), true)
same(await block1.equals(await block1.cid()), true)
same(await block1.equals(block2), true)
same(await block1.equals(block3), false)
})
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