MCPcopy
hub / github.com/krasimir/react-in-patterns / invariant

Function invariant

code/new-context-api/public/app.js:465–484  ·  view source on GitHub ↗
(condition, format, a, b, c, d, e, f)

Source from the content-addressed store, hash-verified

463}
464
465function invariant(condition, format, a, b, c, d, e, f) {
466 validateFormat(format);
467
468 if (!condition) {
469 var error;
470 if (format === undefined) {
471 error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
472 } else {
473 var args = [a, b, c, d, e, f];
474 var argIndex = 0;
475 error = new Error(format.replace(/%s/g, function () {
476 return args[argIndex++];
477 }));
478 error.name = 'Invariant Violation';
479 }
480
481 error.framesToPop = 1; // we don't care about invariant's own frame
482 throw error;
483 }
484}
485
486module.exports = invariant;
487}).call(this,require('_process'))

Callers 15

checkPropTypesFunction · 0.70
app.jsFile · 0.70
invokeGuardedCallbackDevFunction · 0.70
recomputePluginOrderingFunction · 0.70
publishEventForPluginFunction · 0.70
publishRegistrationNameFunction · 0.70
injectEventPluginOrderFunction · 0.70
injectEventPluginsByNameFunction · 0.70
accumulateIntoFunction · 0.70
getListenerFunction · 0.70
runEventsInBatchFunction · 0.70
getNodeFromInstance$1Function · 0.70

Calls 1

validateFormatFunction · 0.70

Tested by

no test coverage detected