From a0ef3eb48c3681567b4c59a0e8de0f4fb47fcfb2 Mon Sep 17 00:00:00 2001 From: SaurabhKumar Date: Mon, 7 Aug 2023 19:15:56 +0530 Subject: [PATCH] AC-8099:Upgrade underscore.js library to the latest version --- lib/web/underscore.js | 27 ++++++++++++++------------- package.json.sample | 2 +- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/lib/web/underscore.js b/lib/web/underscore.js index 3f53992b9fa26..3ce9962341b9d 100644 --- a/lib/web/underscore.js +++ b/lib/web/underscore.js @@ -7,19 +7,19 @@ exports.noConflict = function () { global._ = current; return exports; }; }())); }(this, (function () { - // Underscore.js 1.13.2 + // Underscore.js 1.13.6 // https://underscorejs.org - // (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors + // (c) 2009-2022 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors // Underscore may be freely distributed under the MIT license. // Current version. - var VERSION = '1.13.2'; + var VERSION = '1.13.6'; // Establish the root object, `window` (`self`) in the browser, `global` // on the server, or `this` in some virtual machines. We use `self` // instead of `window` for `WebWorker` support. - var root = typeof self == 'object' && self.self === self && self || - typeof global == 'object' && global.global === global && global || + var root = (typeof self == 'object' && self.self === self && self) || + (typeof global == 'object' && global.global === global && global) || Function('return this')() || {}; @@ -87,7 +87,7 @@ // Is a given variable an object? function isObject(obj) { var type = typeof obj; - return type === 'function' || type === 'object' && !!obj; + return type === 'function' || (type === 'object' && !!obj); } // Is a given value equal to null? @@ -264,7 +264,7 @@ keys = emulatedSet(keys); var nonEnumIdx = nonEnumerableProps.length; var constructor = obj.constructor; - var proto = isFunction$1(constructor) && constructor.prototype || ObjProto; + var proto = (isFunction$1(constructor) && constructor.prototype) || ObjProto; // Constructor is a special case. var prop = 'constructor'; @@ -422,7 +422,7 @@ // from different frames are. var aCtor = a.constructor, bCtor = b.constructor; if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor && - isFunction$1(bCtor) && bCtor instanceof bCtor) + isFunction$1(bCtor) && bCtor instanceof bCtor) && ('constructor' in a && 'constructor' in b)) { return false; } @@ -1467,7 +1467,7 @@ function max(obj, iteratee, context) { var result = -Infinity, lastComputed = -Infinity, value, computed; - if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { + if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) { obj = isArrayLike(obj) ? obj : values(obj); for (var i = 0, length = obj.length; i < length; i++) { value = obj[i]; @@ -1479,7 +1479,7 @@ iteratee = cb(iteratee, context); each(obj, function(v, index, list) { computed = iteratee(v, index, list); - if (computed > lastComputed || computed === -Infinity && result === -Infinity) { + if (computed > lastComputed || (computed === -Infinity && result === -Infinity)) { result = v; lastComputed = computed; } @@ -1492,7 +1492,7 @@ function min(obj, iteratee, context) { var result = Infinity, lastComputed = Infinity, value, computed; - if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) { + if (iteratee == null || (typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null)) { obj = isArrayLike(obj) ? obj : values(obj); for (var i = 0, length = obj.length; i < length; i++) { value = obj[i]; @@ -1504,7 +1504,7 @@ iteratee = cb(iteratee, context); each(obj, function(v, index, list) { computed = iteratee(v, index, list); - if (computed < lastComputed || computed === Infinity && result === Infinity) { + if (computed < lastComputed || (computed === Infinity && result === Infinity)) { result = v; lastComputed = computed; } @@ -1772,7 +1772,7 @@ // Complement of zip. Unzip accepts an array of arrays and groups // each array's elements on shared indices. function unzip(array) { - var length = array && max(array, getLength).length || 0; + var length = (array && max(array, getLength).length) || 0; var result = Array(length); for (var index = 0; index < length; index++) { @@ -2039,3 +2039,4 @@ return _; }))); +//# sourceMappingURL=underscore-umd.js.map diff --git a/package.json.sample b/package.json.sample index 93d6159d12ec0..4698b8b9747a3 100644 --- a/package.json.sample +++ b/package.json.sample @@ -36,6 +36,6 @@ "squirejs": "~0.2.1", "strip-json-comments": "~3.1.1", "time-grunt": "~2.0.0", - "underscore": "1.13.3" + "underscore": "1.13.6" } }