tiny-warning.esm.js 361 B

1234567891011121314151617181920
  1. var isProduction = process.env.NODE_ENV === 'production';
  2. function warning(condition, message) {
  3. if (!isProduction) {
  4. if (condition) {
  5. return;
  6. }
  7. var text = "Warning: " + message;
  8. if (typeof console !== 'undefined') {
  9. console.warn(text);
  10. }
  11. try {
  12. throw Error(text);
  13. } catch (x) {}
  14. }
  15. }
  16. export default warning;