How to use the pusher-js.log 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 travis-ci / travis-web / app / utils / pusher.js View on Github external
return this.pusher = {
      subscribe() {
        return {
          bind_global() {}
        };
      },
      unsubscribe() {},
      channel() {}
    };
  }

  this.apiService = apiService;
  Pusher.warn = this.warn.bind(this);

  if (config.debug) {
    Pusher.log = function (message) {
      if (window.console && window.console.log) {
        window.console.log(message);
      }
    };
  }

  let pusherConfig = {
    encrypted: config.encrypted,
    disableStats: true,
    wsHost: config.host,

    authorizer: function (channel, options) {
      return {
        authorize: function (socketId, callback) {
          let channelName = channel.name;

pusher-js

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

MIT
Latest version published 12 months ago

Package Health Score

72 / 100
Full package analysis