(condition, format, a, b, c, d, e, f)
| 463 | } |
| 464 | |
| 465 | function invariant(condition, format, a, b, c, d, e, f) { |
| 466 | validateFormat(format); |
| 467 | |
| 468 | if (!condition) { |
| 469 | var error; |
| 470 | if (format === undefined) { |
| 471 | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); |
| 472 | } else { |
| 473 | var args = [a, b, c, d, e, f]; |
| 474 | var argIndex = 0; |
| 475 | error = new Error(format.replace(/%s/g, function () { |
| 476 | return args[argIndex++]; |
| 477 | })); |
| 478 | error.name = 'Invariant Violation'; |
| 479 | } |
| 480 | |
| 481 | error.framesToPop = 1; // we don't care about invariant's own frame |
| 482 | throw error; |
| 483 | } |
| 484 | } |
| 485 | |
| 486 | module.exports = invariant; |
| 487 | }).call(this,require('_process')) |
no test coverage detected