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

braid-http

Package Overview
Dependencies
Maintainers
0
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

braid-http - npm Package Compare versions

Comparing version 0.3.20 to 0.3.21

2

braid-http-server.js

@@ -69,3 +69,3 @@ var assert = require('assert')

parse_update(req, update => {
if (update.body)
if (typeof update.body === 'string')
// Return body as an "everything" patch

@@ -72,0 +72,0 @@ cb([{unit: 'everything', range: '', content: update.body}])

{
"name": "braid-http",
"version": "0.3.20",
"version": "0.3.21",
"description": "An implementation of Braid-HTTP for Node.js and Browsers",

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

@@ -106,6 +106,6 @@ # Braid-HTTP

var subscription_iterator = fetch('/chat', {subscribe: true}).subscription
for await (var v of subscription_iterator) {
for await (var update of subscription_iterator) {
// Updates might come in the form of patches:
if (v.patches)
chat = apply_patches(v.patches, chat)
if (update.patches)
chat = apply_patches(update.patches, chat)

@@ -115,3 +115,3 @@ // Or complete snapshots:

// Beware the server doesn't send these yet.
chat = JSON.parse(v.body)
chat = JSON.parse(update.body)

@@ -118,0 +118,0 @@ render_stuff()

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