primus.js
function context(self, method) {
  if (self instanceof Primus) return;

  var failure = new Error('Primus#'+ method + '\'s context should called with a Primus instance');

  if ('function' !== typeof self.listeners || !self.listeners('error').length) {
    throw failure;
  }

  self.emit('error', failure);
}
function context(self, method) {
  if (self instanceof Primus) return;

  var failure = new Error('Primus#'+ method + '\'s context should called with a Primus instance');

  if ('function' !== typeof self.listeners || !self.listeners('error').length) {
    throw failure;
  }

  self.emit('error', failure);
}
function context ( self , method ) { if ( self instanceof Primus ) return ; var failure = new Error ( 'Primus#' + method + '\'s context should called with a Primus instance' ) ; if ( 'function' !== typeof self . listeners || ! self . listeners ( 'error' ) . length ) { throw failure ; } self . emit ( 'error' , failure ) ; }
Context assertion, ensure that some of our public Primus methods are called
with the correct context to ensure that

@param {Primus} self The context of the function.
@param {String} method The method name.
@api private
Context assertion ensure that some of our public Primus methods are called with the correct context to ensure that