JSPM

yarrboard-client

1.3.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11
  • Score
    100M100P100Q35157F
  • License ISC

Client for Yarrboard

Package Exports

  • yarrboard-client

Readme

yarrboard-client

Client for connecting to a Yarrboard

Install

npm install yarrboard-client

Usage

const YarrboardClient = require('yarrboard-client');

yb = new YarrboardClient(options.host, options.user, options.pass, options.login);
setTimeout(yb.printMessageStats.bind(yb), 1000);    

yb.onopen = function () {
  yb.json({"cmd":"toggle_channel","id": 0});
}

yb.onmessage = function (msg) {
  if (msg.msgid)
    this.log(msg.msgid);
}

yb.start();