(condition, format, a, b, c, d, e, f)
| 600 | } |
| 601 | |
| 602 | function invariant(condition, format, a, b, c, d, e, f) { |
| 603 | validateFormat(format); |
| 604 | |
| 605 | if (!condition) { |
| 606 | var error; |
| 607 | if (format === undefined) { |
| 608 | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); |
| 609 | } else { |
| 610 | var args = [a, b, c, d, e, f]; |
| 611 | var argIndex = 0; |
| 612 | error = new Error(format.replace(/%s/g, function () { |
| 613 | return args[argIndex++]; |
| 614 | })); |
| 615 | error.name = 'Invariant Violation'; |
| 616 | } |
| 617 | |
| 618 | error.framesToPop = 1; // we don't care about invariant's own frame |
| 619 | throw error; |
| 620 | } |
| 621 | } |
| 622 | |
| 623 | module.exports = invariant; |
| 624 | }).call(this,require('_process')) |
no test coverage detected