(condition, format, a, b, c, d, e, f)
| 555 | } |
| 556 | |
| 557 | function invariant(condition, format, a, b, c, d, e, f) { |
| 558 | validateFormat(format); |
| 559 | |
| 560 | if (!condition) { |
| 561 | var error; |
| 562 | if (format === undefined) { |
| 563 | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); |
| 564 | } else { |
| 565 | var args = [a, b, c, d, e, f]; |
| 566 | var argIndex = 0; |
| 567 | error = new Error(format.replace(/%s/g, function () { |
| 568 | return args[argIndex++]; |
| 569 | })); |
| 570 | error.name = 'Invariant Violation'; |
| 571 | } |
| 572 | |
| 573 | error.framesToPop = 1; // we don't care about invariant's own frame |
| 574 | throw error; |
| 575 | } |
| 576 | } |
| 577 | |
| 578 | module.exports = invariant; |
| 579 | }).call(this,require('_process')) |
no test coverage detected