MCPcopy
hub / github.com/react/create-react-app / invariant

Function invariant

packages/react-error-overlay/fixtures/bundle_u.mjs:755–774  ·  view source on GitHub ↗
(condition, format, a, b, c, d, e, f)

Source from the content-addressed store, hash-verified

753}
754
755function invariant(condition, format, a, b, c, d, e, f) {
756 validateFormat(format);
757
758 if (!condition) {
759 var error;
760 if (format === undefined) {
761 error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
762 } else {
763 var args = [a, b, c, d, e, f];
764 var argIndex = 0;
765 error = new Error(format.replace(/%s/g, function () {
766 return args[argIndex++];
767 }));
768 error.name = 'Invariant Violation';
769 }
770
771 error.framesToPop = 1; // we don't care about invariant's own frame
772 throw error;
773 }
774}
775
776module.exports = invariant;
777

Callers 15

precacheChildNodesFunction · 0.70
getNodeFromInstanceFunction · 0.70
bundle_u.mjsFile · 0.70
ensureInjectedFunction · 0.70
runBatchedUpdatesFunction · 0.70
asapFunction · 0.70
standardReleaserFunction · 0.70
recomputePluginOrderingFunction · 0.70
publishEventForPluginFunction · 0.70
publishRegistrationNameFunction · 0.70
executeDirectDispatchFunction · 0.70
_assertSingleLinkFunction · 0.70

Calls 1

validateFormatFunction · 0.70

Tested by

no test coverage detected