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