Enhance wrap of wakuDefaultPubsubTopic function
This commit is contained in:
parent
c6116d74b8
commit
76519c2651
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "nodejs-waku",
|
"name": "nodejs-waku",
|
||||||
"version": "0.1.11",
|
"version": "0.1.12",
|
||||||
"description": "NodeJs wrapper of a Waku node",
|
"description": "NodeJs wrapper of a Waku node",
|
||||||
"main": "waku.js",
|
"main": "waku.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -9,11 +9,8 @@ exports.wakuVersion = function() {
|
||||||
wakuMod.wakuVersion(function(msg){ console.log("Waku Version: " + msg) })
|
wakuMod.wakuVersion(function(msg){ console.log("Waku Version: " + msg) })
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.wakuDefaultPubsubTopic = function() {
|
exports.wakuDefaultPubsubTopic = function(defaultPubsubTopicHandler) {
|
||||||
// Example on how to retrieve a value from the waku library
|
wakuMod.wakuDefaultPubsubTopic(defaultPubsubTopicHandler)
|
||||||
var defaultPubsubTopic = ""
|
|
||||||
wakuMod.wakuDefaultPubsubTopic(function(msg){ defaultPubsubTopic = msg })
|
|
||||||
console.log("Default pubsub topic: " + defaultPubsubTopic)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.wakuSetEventCallback = function(eventHandler) {
|
exports.wakuSetEventCallback = function(eventHandler) {
|
||||||
|
|
Loading…
Reference in New Issue