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.

tiny-warning.cjs.js 378 B

пре 3 година
12345678910111213141516171819202122
  1. 'use strict';
  2. var isProduction = process.env.NODE_ENV === 'production';
  3. function warning(condition, message) {
  4. if (!isProduction) {
  5. if (condition) {
  6. return;
  7. }
  8. var text = "Warning: " + message;
  9. if (typeof console !== 'undefined') {
  10. console.warn(text);
  11. }
  12. try {
  13. throw Error(text);
  14. } catch (x) {}
  15. }
  16. }
  17. module.exports = warning;