code: function InvariantError(message, caller) {
    this.name = 'InvariantError';
    this.message = message || 'Invariant failed';
    if (typeof Error.captureStackTrace === 'function') {
      Error.captureStackTrace(this, caller || InvariantError);
    }
  }
docs: # Invariant Error
  Thrown when an invariant fails.
  
  @param {String} message   The error message.
  @param {Function} caller  The function that threw the error, used for cleaning stack traces.