MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / constructor

Method constructor

modules/network/services/pubnub/pubnub.js:29–37  ·  view source on GitHub ↗
(params)

Source from the content-addressed store, hash-verified

27
28export class PubNub {
29 constructor(params) {
30 this.config = { authority:"pubsub.pubnub.com", pnsdk:"Moddable-XS6/1", uuid: UUID() };
31
32 Object.assign(this.config, {
33 pub_key:params.publishKey,
34 sub_key:params.subscribeKey
35 });
36 this.listeners = [];
37 }
38 addListener(listener) {
39 this.listeners.push(listener);
40 }

Callers

nothing calls this directly

Calls 1

UUIDFunction · 0.85

Tested by

no test coverage detected