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

orbit-db-pubsub

Package Overview
Dependencies
Maintainers
1
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.4 to 0.5.5

2

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

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

@@ -14,8 +14,12 @@ # orbit-db-pubsub

#### subscribe(topic, callback)
#### subscribe(topic, onMessageHandler, onNewPeerHandler)
Listen for new messages in `topic`
`callback` gets called when a message is received with signature `(topic, data)`
`onMessageHandler` gets called when a message is received with signature `(topic, data)`
`onNewPeerHandler` gets called when a new peer joins with signature `(topic, peer)`
Returns a promise.
#### unsubscribe(topic)

@@ -25,2 +29,10 @@

Returns a promise.
#### disconnect ()
Stop listening for new messages in all topics
Returns a promise.
#### publish(topic, data)

@@ -36,2 +48,2 @@

[MIT](LICENSE) ©️ 2016 Haadcode
[MIT](LICENSE) ©️ 2016 Haadcode
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