(condition, format, a, b, c, d, e, f)
| 335 | } |
| 336 | |
| 337 | function invariant(condition, format, a, b, c, d, e, f) { |
| 338 | validateFormat(format); |
| 339 | |
| 340 | if (!condition) { |
| 341 | var error; |
| 342 | if (format === undefined) { |
| 343 | error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); |
| 344 | } else { |
| 345 | var args = [a, b, c, d, e, f]; |
| 346 | var argIndex = 0; |
| 347 | error = new Error(format.replace(/%s/g, function () { |
| 348 | return args[argIndex++]; |
| 349 | })); |
| 350 | error.name = 'Invariant Violation'; |
| 351 | } |
| 352 | |
| 353 | error.framesToPop = 1; // we don't care about invariant's own frame |
| 354 | throw error; |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | module.exports = invariant; |
| 359 | }).call(this,require('_process')) |
no test coverage detected