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