orbit-db-pubsub
Advanced tools
Comparing version 0.5.4 to 0.5.5
{ | ||
"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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4657
46