MCPcopy Create free account
hub / github.com/reactjs/react-rails / _invariant

Function _invariant

lib/assets/react-source/development/react.js:29165–29184  ·  view source on GitHub ↗
(condition, format, a, b, c, d, e, f)

Source from the content-addressed store, hash-verified

29163 }
29164
29165 function _invariant(condition, format, a, b, c, d, e, f) {
29166 validateFormat(format);
29167
29168 if (!condition) {
29169 var error;
29170 if (format === undefined) {
29171 error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
29172 } else {
29173 var args = [a, b, c, d, e, f];
29174 var argIndex = 0;
29175 error = new Error(format.replace(/%s/g, function () {
29176 return args[argIndex++];
29177 }));
29178 error.name = 'Invariant Violation';
29179 }
29180
29181 error.framesToPop = 1; // we don't care about invariant's own frame
29182 throw error;
29183 }
29184 }
29185
29186 var warning = function(){};
29187

Callers 5

validateMethodOverrideFunction · 0.70
mixSpecIntoComponentFunction · 0.70
createClassFunction · 0.70

Calls 1

validateFormatFunction · 0.70

Tested by

no test coverage detected