You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

21 lines
551 B

  1. (function (factory) {
  2. typeof define === 'function' && define.amd ? define(factory) :
  3. factory();
  4. }((function () { 'use strict';
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. var isProduction = process.env.NODE_ENV === 'production';
  7. var prefix = 'Invariant failed';
  8. function invariant(condition, message) {
  9. if (condition) {
  10. return;
  11. }
  12. if (isProduction) {
  13. throw new Error(prefix);
  14. }
  15. throw new Error(prefix + ": " + (message || ''));
  16. }
  17. exports.default = invariant;
  18. })));