(condition, format, a, b, c, d, e, f)
| 1639 | */ |
| 1640 | |
| 1641 | var 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 | |
| 1664 | module.exports = invariant; |
| 1665 |
no outgoing calls
no test coverage detected
searching dependent graphs…