mqlight.js
function shouldReconnect(err) {
  // exclude all programming errors
  return (!(err instanceof TypeError) &&
          !(err instanceof InvalidArgumentError) &&
          !(err instanceof NotPermittedError) &&
          !(err instanceof ReplacedError) &&
          !(err instanceof StoppedError) &&
          !(err instanceof SubscribedError) &&
          !(err instanceof UnsubscribedError)
  );
}
function shouldReconnect(err) {
  // exclude all programming errors
  return (!(err instanceof TypeError) &&
          !(err instanceof InvalidArgumentError) &&
          !(err instanceof NotPermittedError) &&
          !(err instanceof ReplacedError) &&
          !(err instanceof StoppedError) &&
          !(err instanceof SubscribedError) &&
          !(err instanceof UnsubscribedError)
  );
}
function shouldReconnect ( err ) { // exclude all programming errors return ( ! ( err instanceof TypeError ) && ! ( err instanceof InvalidArgumentError ) && ! ( err instanceof NotPermittedError ) && ! ( err instanceof ReplacedError ) && ! ( err instanceof StoppedError ) && ! ( err instanceof SubscribedError ) && ! ( err instanceof UnsubscribedError ) ) ; }
Generic helper method to determine if we should automatically reconnect
for the given type of error.

@param {Object}
err - the Error object to check.
@return {Object} true if we should reconnect, false otherwise.
Generic helper method to determine if we should automatically reconnect for the given type of error .