|
Last change
on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago |
|
Added visualizations
|
-
Property mode
set to
100644
|
|
File size:
764 bytes
|
| Rev | Line | |
|---|
| [a762898] | 1 | /* eslint no-console: 0 */
|
|---|
| 2 | var isDev = true;
|
|---|
| 3 | export var warn = function warn(condition, format) {
|
|---|
| 4 | for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|---|
| 5 | args[_key - 2] = arguments[_key];
|
|---|
| 6 | }
|
|---|
| 7 | if (isDev && typeof console !== 'undefined' && console.warn) {
|
|---|
| 8 | if (format === undefined) {
|
|---|
| 9 | console.warn('LogUtils requires an error message argument');
|
|---|
| 10 | }
|
|---|
| 11 | if (!condition) {
|
|---|
| 12 | if (format === undefined) {
|
|---|
| 13 | console.warn('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.');
|
|---|
| 14 | } else {
|
|---|
| 15 | var argIndex = 0;
|
|---|
| 16 | console.warn(format.replace(/%s/g, () => args[argIndex++]));
|
|---|
| 17 | }
|
|---|
| 18 | }
|
|---|
| 19 | }
|
|---|
| 20 | }; |
|---|
Note:
See
TracBrowser
for help on using the repository browser.