MCPcopy Create free account
hub / github.com/docker/getting-started / invariant

Function invariant

app/src/static/js/react-bootstrap.js:1641–1662  ·  view source on GitHub ↗
(condition, format, a, b, c, d, e, f)

Source from the content-addressed store, hash-verified

1639 */
1640
1641var invariant = function (condition, format, a, b, c, d, e, f) {
1642 if (false) {}
1643
1644 if (!condition) {
1645 var error;
1646
1647 if (format === undefined) {
1648 error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
1649 } else {
1650 var args = [a, b, c, d, e, f];
1651 var argIndex = 0;
1652 error = new Error(format.replace(/%s/g, function () {
1653 return args[argIndex++];
1654 }));
1655 error.name = 'Invariant Violation';
1656 }
1657
1658 error.framesToPop = 1; // we don't care about invariant's own frame
1659
1660 throw error;
1661 }
1662};
1663
1664module.exports = invariant;
1665

Callers 1

uncontrollableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…