(condition, format, a, b, c, d, e, f)
| 497 | } |
| 498 | |
| 499 | function invariant(condition, format, a, b, c, d, e, f) { |
| 500 | validateFormat(format); |
| 501 | |
| 502 | if (!condition) { |
| 503 | var error; |
| 504 | if (format === undefined) { |
| 505 | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); |
| 506 | } else { |
| 507 | var args = [a, b, c, d, e, f]; |
| 508 | var argIndex = 0; |
| 509 | error = new Error(format.replace(/%s/g, function () { |
| 510 | return args[argIndex++]; |
| 511 | })); |
| 512 | error.name = 'Invariant Violation'; |
| 513 | } |
| 514 | |
| 515 | error.framesToPop = 1; // we don't care about invariant's own frame |
| 516 | throw error; |
| 517 | } |
| 518 | } |
| 519 | |
| 520 | module.exports = invariant; |
| 521 | }).call(this,require('_process')) |
no test coverage detected