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

hypercore-protocol

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hypercore-protocol - npm Package Compare versions

Comparing version 6.0.1 to 6.1.0

5

feed.js

@@ -76,2 +76,7 @@ var events = require('events')

this.id = -1
if (this.stream.destroyed) return
if (this.stream.expectedFeeds <= 0 || --this.stream.expectedFeeds) return
this.stream.finalize()
}

@@ -78,0 +83,0 @@ }

1

index.js

@@ -27,2 +27,3 @@ var stream = require('readable-stream')

this.feeds = []
this.expectedFeeds = opts.expectedFeeds || 0

@@ -29,0 +30,0 @@ this._localFeeds = []

2

package.json
{
"name": "hypercore-protocol",
"version": "6.0.1",
"version": "6.1.0",
"description": "Stream that implements the hypercore protocol",

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

@@ -157,3 +157,3 @@ # hypercore-protocol

```
message: header + payload
message = header + payload
```

@@ -160,0 +160,0 @@

@@ -349,1 +349,37 @@ var tape = require('tape')

})
tape('expected feeds', function (t) {
var a = protocol({expectedFeeds: 1})
a.resume()
a.on('end', function () {
t.pass('should end')
t.end()
})
var ch = a.feed(KEY)
ch.close()
})
tape('2 expected feeds', function (t) {
var a = protocol({expectedFeeds: 2})
var created = 0
a.resume()
a.on('end', function () {
t.same(created, 2, 'created two feeds')
t.pass('should end')
t.end()
})
created++
var ch = a.feed(KEY)
ch.close()
setTimeout(function () {
created++
var ch = a.feed(OTHER_KEY)
ch.close()
}, 100)
})

Sorry, the diff of this file is not supported yet

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