aswi2020vldc-gitlab/templetes/node_modules/tiny-warning/dist/tiny-warning.esm.js @ 78a2184f
1 | 3a515b92 | cagy | var isProduction = process.env.NODE_ENV === 'production'; |
---|---|---|---|
2 | function warning(condition, message) { |
||
3 | if (!isProduction) { |
||
4 | if (condition) { |
||
5 | return; |
||
6 | }
|
||
7 | |||
8 | var text = "Warning: " + message; |
||
9 | |||
10 | if (typeof console !== 'undefined') { |
||
11 | console.warn(text); |
||
12 | }
|
||
13 | |||
14 | try { |
||
15 | throw Error(text); |
||
16 | } catch (x) {} |
||
17 | }
|
||
18 | }
|
||
19 | |||
20 | export default warning; |