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

hypersource

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hypersource - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

2

package.json
{
"name": "hypersource",
"version": "0.1.1",
"version": "0.1.2",
"description": "Build WebSocket APIs that leverage the HyperCore Protocol",

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

@@ -63,6 +63,2 @@ const { Duplex } = require('readable-stream')

if (this.stream) {
process.nextTick(pump, this, this.stream, this)
}
if (opts.socket && 'function' === typeof opts.socket.send) {

@@ -111,5 +107,5 @@ process.nextTick(() => this._onOpen())

userData: this.userData,
download: true,
upload: true,
live: true,
download: this.download,
upload: this.upload,
live: this.live,
})

@@ -116,0 +112,0 @@

@@ -20,3 +20,2 @@ const WebSocket = require('simple-websocket')

reader.replicate(req)
writer.replicate(res)

@@ -28,3 +27,7 @@ writer.once('upload', () => {

reader.get(0, (err, buf) => writer.append(buf))
reader.get(0, (err, buf) => {
writer.append(buf, () => {
setTimeout(() => writer.replicate(res), 1000 * Math.random())
})
})
})

@@ -47,6 +50,8 @@

request.append('hello world')
const buf = Buffer.alloc(612444 * 2)
buf.fill(Buffer.from('hello world'))
request.append(buf)
response.replicate({ stream, live: true })
response.get(0, (err, res) => {
t.equal('hello world', res.toString())
t.ok(0 === Buffer.compare(buf, res))
socket.destroy()

@@ -53,0 +58,0 @@ server.close()

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