@lskjs/utils
Advanced tools
Comparing version 2.12.0 to 2.12.3
@@ -5,6 +5,9 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _toArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toArray")); | ||
var _env = require("@lskjs/env"); | ||
var _log = _interopRequireDefault(require("@lskjs/log2")); | ||
@@ -23,4 +26,11 @@ | ||
/* eslint-disable no-console */ | ||
if (_env.isDev) { | ||
var log = new _log["default"]({ | ||
var _default = function _default() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, | ||
_ref$enable = _ref.enable, | ||
enable = _ref$enable === void 0 ? 1 : _ref$enable, | ||
_ref$collapse = _ref.collapse, | ||
collapse = _ref$collapse === void 0 ? 1 : _ref$collapse; | ||
if (!enable) return; | ||
var logger = new _log["default"]({ | ||
name: 'React' | ||
@@ -57,6 +67,6 @@ }); | ||
var res = (0, _mapValues["default"])(groups, function (_ref) { | ||
var _ref2 = (0, _toArray2["default"])(_ref), | ||
_ = _ref2[0], | ||
g = _ref2.slice(1); | ||
var res = (0, _mapValues["default"])(groups, function (_ref2) { | ||
var _ref3 = (0, _toArray2["default"])(_ref2), | ||
_ = _ref3[0], | ||
g = _ref3.slice(1); | ||
@@ -67,3 +77,3 @@ return g; | ||
if (Object.keys(res).length) { | ||
log.warn(res); | ||
logger.warn(res); | ||
stack = []; | ||
@@ -77,2 +87,4 @@ } | ||
if (!collapse) return null; | ||
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | ||
@@ -92,2 +104,4 @@ args[_key2] = arguments[_key2]; | ||
if (!collapse) return null; | ||
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | ||
@@ -103,3 +117,5 @@ args[_key3] = arguments[_key3]; | ||
}; | ||
} | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=hide-react-console-logs.js.map |
{ | ||
"name": "@lskjs/utils", | ||
"version": "2.12.0", | ||
"version": "2.12.3", | ||
"description": "LSK.js – utils – helpers and functions", | ||
@@ -41,3 +41,3 @@ "keywords": [], | ||
}, | ||
"gitHead": "6b9af35da8d382d07ef889c3167cf69e8b606e3f" | ||
"gitHead": "04e53e23ad2d447c1fa7ff8e42722735a7e4addc" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
357892
3618