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

orbit-db-pubsub

Package Overview
Dependencies
Maintainers
3
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

orbit-db-pubsub - npm Package Compare versions

Comparing version 0.5.6 to 0.5.7

2

package.json
{
"name": "orbit-db-pubsub",
"version": "0.5.6",
"version": "0.5.7",
"description": "Message propagation module for orbit-db",

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

@@ -30,5 +30,5 @@ 'use strict'

async subscribe(topic, onMessageCallback, onNewPeerCallback) {
async subscribe(topic, onMessageCallback, onNewPeerCallback, options = {}) {
if(!this._subscriptions[topic] && this._ipfs.pubsub) {
await this._ipfs.pubsub.subscribe(topic, this._handleMessage)
await this._ipfs.pubsub.subscribe(topic, this._handleMessage, options)

@@ -73,5 +73,5 @@ const topicMonitor = new PeerMonitor(this._ipfs.pubsub, topic)

publish(topic, message) {
publish(topic, message, options = {}) {
if(this._subscriptions[topic] && this._ipfs.pubsub) {
this._ipfs.pubsub.publish(topic, Buffer.from(JSON.stringify(message)))
this._ipfs.pubsub.publish(topic, Buffer.from(JSON.stringify(message)), options)
}

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

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