How to use the pusher-js/node function in pusher-js

To help you get started, we’ve selected a few pusher-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github magic8bot / magic8bot / legacy / exchanges / bitstamp / index.ts View on Github external
const Bitstamp_WS = function(opts) {
    if (opts) {
      this.opts = opts
    } else {
      this.opts = {
        encrypted: true,
      }
    }

    this.client = new Pusher(BITSTAMP_PUSHER_KEY, {
      encrypted: this.opts.encrypted,
      // encrypted: true
    })

    // bitstamp publishes all data over just 2 channels
    // make sure we only subscribe to each channel once
    this.bound = {
      trade: false,
      data: false,
    }

    this.subscribe()
  }

pusher-js

Pusher Channels JavaScript library for browsers, React Native, NodeJS and web workers

MIT
Latest version published 1 year ago

Package Health Score

77 / 100
Full package analysis