Buckets:
| // @flow | |
| const isProduction: boolean = process.env.NODE_ENV === 'production'; | |
| export default function warning(condition: mixed, message: string): void { | |
| // don't do anything in production | |
| // wrapping in production check for better dead code elimination | |
| if (!isProduction) { | |
| // condition passed: do not log | |
| if (condition) { | |
| return; | |
| } | |
| // Condition not passed | |
| const text: string = `Warning: ${message}`; | |
| // check console for IE9 support which provides console | |
| // only with open devtools | |
| if (typeof console !== 'undefined') { | |
| console.warn(text); | |
| } | |
| // Throwing an error and catching it immediately | |
| // to improve debugging | |
| // A consumer can use 'pause on caught exceptions' | |
| // https://github.com/facebook/react/issues/4216 | |
| try { | |
| throw Error(text); | |
| } catch (x) {} | |
| } | |
| } | |
Xet Storage Details
- Size:
- 851 Bytes
- Xet hash:
- b944c56c32929934f18c91cc9e4dc1119915830734a69d991b353c5d8f51d40f
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.