code: function communicate(action, params, promise) {
        if (arguments.length < 3) {
          promise = params;
          params = null;
        }
  
        sender(action, params)
          .then(function() {
            if (typeof promise !== 'function')
              promise.resolve.apply(null, arguments);
            else
              promise.apply(null, arguments);
          })
          .fail(brokenPipe);
  
        return typeof promise !== 'function' ? promise : undefined;
      }
docs: Communication