@mll-lab/js-utils 2.41.0 → 2.41.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.common.js +11 -5
- package/dist/index.common.js.map +1 -1
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/package.json +9 -5
package/dist/index.common.js
CHANGED
|
@@ -29,7 +29,7 @@ function createCommonjsModule(fn) {
|
|
|
29
29
|
return fn(module, module.exports), module.exports;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
var lodash=createCommonjsModule(function(module,exports){(function(){/** Used as a safe reference for `undefined` in pre-ES5 environments. */var undefined$1;/** Used as the semantic version number. */var VERSION='4.17.
|
|
32
|
+
var lodash=createCommonjsModule(function(module,exports){(function(){/** Used as a safe reference for `undefined` in pre-ES5 environments. */var undefined$1;/** Used as the semantic version number. */var VERSION='4.17.23';/** Used as the size to enable large array optimizations. */var LARGE_ARRAY_SIZE=200;/** Error message constants. */var CORE_ERROR_TEXT='Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',FUNC_ERROR_TEXT='Expected a function',INVALID_TEMPL_VAR_ERROR_TEXT='Invalid `variable` option passed into `_.template`';/** Used to stand-in for `undefined` hash values. */var HASH_UNDEFINED='__lodash_hash_undefined__';/** Used as the maximum memoize cache size. */var MAX_MEMOIZE_SIZE=500;/** Used as the internal argument placeholder. */var PLACEHOLDER='__lodash_placeholder__';/** Used to compose bitmasks for cloning. */var CLONE_DEEP_FLAG=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG=4;/** Used to compose bitmasks for value comparisons. */var COMPARE_PARTIAL_FLAG=1,COMPARE_UNORDERED_FLAG=2;/** Used to compose bitmasks for function metadata. */var WRAP_BIND_FLAG=1,WRAP_BIND_KEY_FLAG=2,WRAP_CURRY_BOUND_FLAG=4,WRAP_CURRY_FLAG=8,WRAP_CURRY_RIGHT_FLAG=16,WRAP_PARTIAL_FLAG=32,WRAP_PARTIAL_RIGHT_FLAG=64,WRAP_ARY_FLAG=128,WRAP_REARG_FLAG=256,WRAP_FLIP_FLAG=512;/** Used as default options for `_.truncate`. */var DEFAULT_TRUNC_LENGTH=30,DEFAULT_TRUNC_OMISSION='...';/** Used to detect hot functions by number of calls within a span of milliseconds. */var HOT_COUNT=800,HOT_SPAN=16;/** Used to indicate the type of lazy iteratees. */var LAZY_FILTER_FLAG=1,LAZY_MAP_FLAG=2,LAZY_WHILE_FLAG=3;/** Used as references for various `Number` constants. */var INFINITY=1/0,MAX_SAFE_INTEGER=9007199254740991,MAX_INTEGER=1.7976931348623157e+308,NAN=0/0;/** Used as references for the maximum length and index of an array. */var MAX_ARRAY_LENGTH=4294967295,MAX_ARRAY_INDEX=MAX_ARRAY_LENGTH-1,HALF_MAX_ARRAY_LENGTH=MAX_ARRAY_LENGTH>>>1;/** Used to associate wrap methods with their bit flags. */var wrapFlags=[['ary',WRAP_ARY_FLAG],['bind',WRAP_BIND_FLAG],['bindKey',WRAP_BIND_KEY_FLAG],['curry',WRAP_CURRY_FLAG],['curryRight',WRAP_CURRY_RIGHT_FLAG],['flip',WRAP_FLIP_FLAG],['partial',WRAP_PARTIAL_FLAG],['partialRight',WRAP_PARTIAL_RIGHT_FLAG],['rearg',WRAP_REARG_FLAG]];/** `Object#toString` result references. */var argsTag='[object Arguments]',arrayTag='[object Array]',asyncTag='[object AsyncFunction]',boolTag='[object Boolean]',dateTag='[object Date]',domExcTag='[object DOMException]',errorTag='[object Error]',funcTag='[object Function]',genTag='[object GeneratorFunction]',mapTag='[object Map]',numberTag='[object Number]',nullTag='[object Null]',objectTag='[object Object]',promiseTag='[object Promise]',proxyTag='[object Proxy]',regexpTag='[object RegExp]',setTag='[object Set]',stringTag='[object String]',symbolTag='[object Symbol]',undefinedTag='[object Undefined]',weakMapTag='[object WeakMap]',weakSetTag='[object WeakSet]';var arrayBufferTag='[object ArrayBuffer]',dataViewTag='[object DataView]',float32Tag='[object Float32Array]',float64Tag='[object Float64Array]',int8Tag='[object Int8Array]',int16Tag='[object Int16Array]',int32Tag='[object Int32Array]',uint8Tag='[object Uint8Array]',uint8ClampedTag='[object Uint8ClampedArray]',uint16Tag='[object Uint16Array]',uint32Tag='[object Uint32Array]';/** Used to match empty string literals in compiled template source. */var reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g;/** Used to match HTML entities and HTML characters. */var reEscapedHtml=/&(?:amp|lt|gt|quot|#39);/g,reUnescapedHtml=/[&<>"']/g,reHasEscapedHtml=RegExp(reEscapedHtml.source),reHasUnescapedHtml=RegExp(reUnescapedHtml.source);/** Used to match template delimiters. */var reEscape=/<%-([\s\S]+?)%>/g,reEvaluate=/<%([\s\S]+?)%>/g,reInterpolate=/<%=([\s\S]+?)%>/g;/** Used to match property names within property paths. */var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/,rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;/**
|
|
33
33
|
* Used to match `RegExp`
|
|
34
34
|
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
35
35
|
*/var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reHasRegExpChar=RegExp(reRegExpChar.source);/** Used to match leading whitespace. */var reTrimStart=/^\s+/;/** Used to match a single whitespace character. */var reWhitespace=/\s/;/** Used to match wrap detail comments. */var reWrapComment=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,reWrapDetails=/\{\n\/\* \[wrapped with (.+)\] \*/,reSplitDetails=/,? & /;/** Used to match words composed of alphanumeric characters. */var reAsciiWord=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;/**
|
|
@@ -1620,7 +1620,12 @@ return arrayMap(value,baseToString)+'';}if(isSymbol(value)){return symbolToStrin
|
|
|
1620
1620
|
* @param {Object} object The object to modify.
|
|
1621
1621
|
* @param {Array|string} path The property path to unset.
|
|
1622
1622
|
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
|
|
1623
|
-
*/function baseUnset(object,path){path=castPath(path,object)
|
|
1623
|
+
*/function baseUnset(object,path){path=castPath(path,object);// Prevent prototype pollution, see: https://github.com/lodash/lodash/security/advisories/GHSA-xxjr-mmjv-4gpg
|
|
1624
|
+
var index=-1,length=path.length;if(!length){return true;}var isRootPrimitive=object==null||_typeof__default["default"](object)!=='object'&&typeof object!=='function';while(++index<length){var key=path[index];// skip non-string keys (e.g., Symbols, numbers)
|
|
1625
|
+
if(typeof key!=='string'){continue;}// Always block "__proto__" anywhere in the path if it's not expected
|
|
1626
|
+
if(key==='__proto__'&&!hasOwnProperty.call(object,'__proto__')){return false;}// Block "constructor.prototype" chains
|
|
1627
|
+
if(key==='constructor'&&index+1<length&&typeof path[index+1]==='string'&&path[index+1]==='prototype'){// Allow ONLY when the path starts at a primitive root, e.g., _.unset(0, 'constructor.prototype.a')
|
|
1628
|
+
if(isRootPrimitive&&index===0){continue;}return false;}}var obj=parent(object,path);return obj==null||delete obj[toKey(last(path))];}/**
|
|
1624
1629
|
* The base implementation of `_.update`.
|
|
1625
1630
|
*
|
|
1626
1631
|
* @private
|
|
@@ -15986,13 +15991,14 @@ function isMobileDevice() {
|
|
|
15986
15991
|
*/
|
|
15987
15992
|
function errorMessage(error) {
|
|
15988
15993
|
const message = hasMessage(error) ? error.message : error;
|
|
15994
|
+
// eslint-disable-next-line @mll-lab/prefer-loose-nullish-equality -- intentionally distinguish null and undefined
|
|
15989
15995
|
if (message === undefined) {
|
|
15990
15996
|
return 'undefined';
|
|
15991
15997
|
}
|
|
15992
15998
|
return typeof message === 'string' ? message : JSON.stringify(error);
|
|
15993
15999
|
}
|
|
15994
16000
|
function hasMessage(error) {
|
|
15995
|
-
return typeof error === 'object' &&
|
|
16001
|
+
return error != null && typeof error === 'object' && 'message' in error;
|
|
15996
16002
|
}
|
|
15997
16003
|
|
|
15998
16004
|
/** Triggers a file download in the browser. */
|
|
@@ -16069,7 +16075,7 @@ function formatGermanNumber(value, _a = {}) {
|
|
|
16069
16075
|
* If the value can not be parsed, this function returns null.
|
|
16070
16076
|
*/
|
|
16071
16077
|
function parseGermanNumber(value) {
|
|
16072
|
-
if (value
|
|
16078
|
+
if (value == null) {
|
|
16073
16079
|
return null;
|
|
16074
16080
|
}
|
|
16075
16081
|
const normalizedValue = value
|
|
@@ -16118,7 +16124,7 @@ function firstDecimalDigit(number) {
|
|
|
16118
16124
|
}
|
|
16119
16125
|
const regExp = /\d*\.(\d)/;
|
|
16120
16126
|
const regExpMatchArray = number.toString().match(regExp);
|
|
16121
|
-
if (regExpMatchArray
|
|
16127
|
+
if (regExpMatchArray == null) {
|
|
16122
16128
|
throw new Error(`Invalid number for regex matching: ${number}`);
|
|
16123
16129
|
}
|
|
16124
16130
|
return Number(regExpMatchArray[1]);
|