diff --git a/modules/_createIndexFinder.js b/modules/_createIndexFinder.js
index eadedef0b..3c4b7f14d 100644
--- a/modules/_createIndexFinder.js
+++ b/modules/_createIndexFinder.js
@@ -6,7 +6,7 @@ import isNaN from './isNaN.js';
export default function createIndexFinder(dir, predicateFind, sortedIndex) {
return function(array, item, idx) {
var i = 0, length = getLength(array);
- if (typeof idx == 'number') {
+ if (typeof idx === 'number') {
if (dir > 0) {
i = idx >= 0 ? idx : Math.max(idx + length, i);
} else {
diff --git a/modules/_createSizePropertyCheck.js b/modules/_createSizePropertyCheck.js
index cc38007bc..7a4c1f314 100644
--- a/modules/_createSizePropertyCheck.js
+++ b/modules/_createSizePropertyCheck.js
@@ -4,6 +4,6 @@ import { MAX_ARRAY_INDEX } from './_setup.js';
export default function createSizePropertyCheck(getSizeProperty) {
return function(collection) {
var sizeProperty = getSizeProperty(collection);
- return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
+ return typeof sizeProperty === 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
}
}
diff --git a/modules/_setup.js b/modules/_setup.js
index de8d79ca9..4ae6fe472 100644
--- a/modules/_setup.js
+++ b/modules/_setup.js
@@ -4,8 +4,8 @@ export 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.
-export var root = (typeof self == 'object' && self.self === self && self) ||
- (typeof global == 'object' && global.global === global && global) ||
+export var root = (typeof self === 'object' && self.self === self && self) ||
+ (typeof global === 'object' && global.global === global && global) ||
Function('return this')() ||
{};
diff --git a/modules/contains.js b/modules/contains.js
index 11cf64d61..0b73f6d13 100644
--- a/modules/contains.js
+++ b/modules/contains.js
@@ -5,6 +5,6 @@ import indexOf from './indexOf.js';
// Determine if the array or object contains a given item (using `===`).
export default function contains(obj, item, fromIndex, guard) {
if (!isArrayLike(obj)) obj = values(obj);
- if (typeof fromIndex != 'number' || guard) fromIndex = 0;
+ if (typeof fromIndex !== 'number' || guard) fromIndex = 0;
return indexOf(obj, item, fromIndex) >= 0;
}
diff --git a/modules/isEmpty.js b/modules/isEmpty.js
index 718ef4a62..145d8f92c 100644
--- a/modules/isEmpty.js
+++ b/modules/isEmpty.js
@@ -11,7 +11,7 @@ export default function isEmpty(obj) {
// Skip the more expensive `toString`-based type checks if `obj` has no
// `.length`.
var length = getLength(obj);
- if (typeof length == 'number' && (
+ if (typeof length === 'number' && (
isArray(obj) || isString(obj) || isArguments(obj)
)) return length === 0;
return getLength(keys(obj)) === 0;
diff --git a/modules/isEqual.js b/modules/isEqual.js
index 5285c55a4..77718dec1 100644
--- a/modules/isEqual.js
+++ b/modules/isEqual.js
@@ -23,7 +23,7 @@ function eq(a, b, aStack, bStack) {
if (a !== a) return b !== b;
// Exhaust primitive checks
var type = typeof a;
- if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
+ if (type !== 'function' && type !== 'object' && typeof b !== 'object') return false;
return deepEq(a, b, aStack, bStack);
}
@@ -36,7 +36,7 @@ function deepEq(a, b, aStack, bStack) {
var className = toString.call(a);
if (className !== toString.call(b)) return false;
// Work around a bug in IE 10 - Edge 13.
- if (hasStringTagBug && className == '[object Object]' && isDataView(a)) {
+ if (hasStringTagBug && className === '[object Object]' && isDataView(a)) {
if (!isDataView(b)) return false;
className = tagDataView;
}
@@ -76,7 +76,7 @@ function deepEq(a, b, aStack, bStack) {
areArrays = true;
}
if (!areArrays) {
- if (typeof a != 'object' || typeof b != 'object') return false;
+ if (typeof a !== 'object' || typeof b !== 'object') return false;
// Objects with different constructors are not equivalent, but `Object`s or `Array`s
// from different frames are.
diff --git a/modules/isFunction.js b/modules/isFunction.js
index 35c41be0c..7150181d7 100644
--- a/modules/isFunction.js
+++ b/modules/isFunction.js
@@ -6,9 +6,9 @@ var isFunction = tagTester('Function');
// Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old
// v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
var nodelist = root.document && root.document.childNodes;
-if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
+if (typeof /./ !== 'function' && typeof Int8Array !== 'object' && typeof nodelist !== 'function') {
isFunction = function(obj) {
- return typeof obj == 'function' || false;
+ return typeof obj === 'function' || false;
};
}
diff --git a/modules/max.js b/modules/max.js
index e32540978..c9c0b6ca6 100644
--- a/modules/max.js
+++ b/modules/max.js
@@ -7,7 +7,7 @@ import each from './each.js';
export default 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];
diff --git a/modules/min.js b/modules/min.js
index c6b25fd8f..102872a3c 100644
--- a/modules/min.js
+++ b/modules/min.js
@@ -7,7 +7,7 @@ import each from './each.js';
export default 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];
diff --git a/test/collections.js b/test/collections.js
index 3439a100f..d601fadd1 100644
--- a/test/collections.js
+++ b/test/collections.js
@@ -883,7 +883,7 @@
assert.deepEqual(_.toArray(expected.join('')), expected, 'maintains astral characters');
assert.deepEqual(_.toArray(''), [], 'empty string into empty array');
- if (typeof document != 'undefined') {
+ if (typeof document !== 'undefined') {
// test in IE < 9
var actual;
try {
@@ -942,7 +942,7 @@
}, predicate);
});
- if (typeof document != 'undefined') {
+ if (typeof document !== 'undefined') {
QUnit.test('Can use various collection methods on NodeLists', function(assert) {
var parent = document.createElement('div');
parent.innerHTML = 'textnode';
diff --git a/test/cross-document.js b/test/cross-document.js
index 51546b214..c72407542 100644
--- a/test/cross-document.js
+++ b/test/cross-document.js
@@ -111,7 +111,7 @@
assert.ok(_.isError(iError), 'even from another frame');
});
- if (typeof ActiveXObject != 'undefined') {
+ if (typeof ActiveXObject !== 'undefined') {
QUnit.test('IE host objects', function(assert) {
var xml = new ActiveXObject('Msxml2.DOMDocument.3.0');
assert.ok(!_.isNumber(xml));
diff --git a/underscore-esm.js b/underscore-esm.js
index 07ff9851a..12b00817e 100644
--- a/underscore-esm.js
+++ b/underscore-esm.js
@@ -9,8 +9,8 @@ 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')() ||
{};
@@ -128,9 +128,9 @@ var isFunction = tagTester('Function');
// Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old
// v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
var nodelist = root.document && root.document.childNodes;
-if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
+if (typeof /./ !== 'function' && typeof Int8Array !== 'object' && typeof nodelist !== 'function') {
isFunction = function(obj) {
- return typeof obj == 'function' || false;
+ return typeof obj === 'function' || false;
};
}
@@ -200,7 +200,7 @@ function constant(value) {
function createSizePropertyCheck(getSizeProperty) {
return function(collection) {
var sizeProperty = getSizeProperty(collection);
- return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
+ return typeof sizeProperty === 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
}
}
@@ -288,7 +288,7 @@ function isEmpty(obj) {
// Skip the more expensive `toString`-based type checks if `obj` has no
// `.length`.
var length = getLength(obj);
- if (typeof length == 'number' && (
+ if (typeof length === 'number' && (
isArray(obj) || isString(obj) || isArguments$1(obj)
)) return length === 0;
return getLength(keys(obj)) === 0;
@@ -354,7 +354,7 @@ function eq(a, b, aStack, bStack) {
if (a !== a) return b !== b;
// Exhaust primitive checks
var type = typeof a;
- if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
+ if (type !== 'function' && type !== 'object' && typeof b !== 'object') return false;
return deepEq(a, b, aStack, bStack);
}
@@ -367,7 +367,7 @@ function deepEq(a, b, aStack, bStack) {
var className = toString.call(a);
if (className !== toString.call(b)) return false;
// Work around a bug in IE 10 - Edge 13.
- if (hasStringTagBug && className == '[object Object]' && isDataView$1(a)) {
+ if (hasStringTagBug && className === '[object Object]' && isDataView$1(a)) {
if (!isDataView$1(b)) return false;
className = tagDataView;
}
@@ -407,7 +407,7 @@ function deepEq(a, b, aStack, bStack) {
areArrays = true;
}
if (!areArrays) {
- if (typeof a != 'object' || typeof b != 'object') return false;
+ if (typeof a !== 'object' || typeof b !== 'object') return false;
// Objects with different constructors are not equivalent, but `Object`s or `Array`s
// from different frames are.
@@ -1265,7 +1265,7 @@ function sortedIndex(array, obj, iteratee, context) {
function createIndexFinder(dir, predicateFind, sortedIndex) {
return function(array, item, idx) {
var i = 0, length = getLength(array);
- if (typeof idx == 'number') {
+ if (typeof idx === 'number') {
if (dir > 0) {
i = idx >= 0 ? idx : Math.max(idx + length, i);
} else {
@@ -1416,7 +1416,7 @@ function some(obj, predicate, context) {
// Determine if the array or object contains a given item (using `===`).
function contains(obj, item, fromIndex, guard) {
if (!isArrayLike(obj)) obj = values(obj);
- if (typeof fromIndex != 'number' || guard) fromIndex = 0;
+ if (typeof fromIndex !== 'number' || guard) fromIndex = 0;
return indexOf(obj, item, fromIndex) >= 0;
}
@@ -1458,7 +1458,7 @@ function where(obj, attrs) {
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];
@@ -1483,7 +1483,7 @@ function max(obj, iteratee, context) {
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];
diff --git a/underscore-node-f.cjs b/underscore-node-f.cjs
index e1b1ac7b8..b710c62f4 100644
--- a/underscore-node-f.cjs
+++ b/underscore-node-f.cjs
@@ -11,8 +11,8 @@ 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')() ||
{};
@@ -130,9 +130,9 @@ var isFunction = tagTester('Function');
// Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old
// v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
var nodelist = root.document && root.document.childNodes;
-if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
+if (typeof /./ !== 'function' && typeof Int8Array !== 'object' && typeof nodelist !== 'function') {
isFunction = function(obj) {
- return typeof obj == 'function' || false;
+ return typeof obj === 'function' || false;
};
}
@@ -202,7 +202,7 @@ function constant(value) {
function createSizePropertyCheck(getSizeProperty) {
return function(collection) {
var sizeProperty = getSizeProperty(collection);
- return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
+ return typeof sizeProperty === 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
}
}
@@ -290,7 +290,7 @@ function isEmpty(obj) {
// Skip the more expensive `toString`-based type checks if `obj` has no
// `.length`.
var length = getLength(obj);
- if (typeof length == 'number' && (
+ if (typeof length === 'number' && (
isArray(obj) || isString(obj) || isArguments$1(obj)
)) return length === 0;
return getLength(keys(obj)) === 0;
@@ -356,7 +356,7 @@ function eq(a, b, aStack, bStack) {
if (a !== a) return b !== b;
// Exhaust primitive checks
var type = typeof a;
- if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
+ if (type !== 'function' && type !== 'object' && typeof b !== 'object') return false;
return deepEq(a, b, aStack, bStack);
}
@@ -369,7 +369,7 @@ function deepEq(a, b, aStack, bStack) {
var className = toString.call(a);
if (className !== toString.call(b)) return false;
// Work around a bug in IE 10 - Edge 13.
- if (hasStringTagBug && className == '[object Object]' && isDataView$1(a)) {
+ if (hasStringTagBug && className === '[object Object]' && isDataView$1(a)) {
if (!isDataView$1(b)) return false;
className = tagDataView;
}
@@ -409,7 +409,7 @@ function deepEq(a, b, aStack, bStack) {
areArrays = true;
}
if (!areArrays) {
- if (typeof a != 'object' || typeof b != 'object') return false;
+ if (typeof a !== 'object' || typeof b !== 'object') return false;
// Objects with different constructors are not equivalent, but `Object`s or `Array`s
// from different frames are.
@@ -1267,7 +1267,7 @@ function sortedIndex(array, obj, iteratee, context) {
function createIndexFinder(dir, predicateFind, sortedIndex) {
return function(array, item, idx) {
var i = 0, length = getLength(array);
- if (typeof idx == 'number') {
+ if (typeof idx === 'number') {
if (dir > 0) {
i = idx >= 0 ? idx : Math.max(idx + length, i);
} else {
@@ -1418,7 +1418,7 @@ function some(obj, predicate, context) {
// Determine if the array or object contains a given item (using `===`).
function contains(obj, item, fromIndex, guard) {
if (!isArrayLike(obj)) obj = values(obj);
- if (typeof fromIndex != 'number' || guard) fromIndex = 0;
+ if (typeof fromIndex !== 'number' || guard) fromIndex = 0;
return indexOf(obj, item, fromIndex) >= 0;
}
@@ -1460,7 +1460,7 @@ function where(obj, attrs) {
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];
@@ -1485,7 +1485,7 @@ function max(obj, iteratee, context) {
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];
diff --git a/underscore-umd.js b/underscore-umd.js
index c81e732e9..01c90ad5b 100644
--- a/underscore-umd.js
+++ b/underscore-umd.js
@@ -18,8 +18,8 @@
// 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')() ||
{};
@@ -137,9 +137,9 @@
// Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old
// v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
var nodelist = root.document && root.document.childNodes;
- if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
+ if (typeof /./ !== 'function' && typeof Int8Array !== 'object' && typeof nodelist !== 'function') {
isFunction = function(obj) {
- return typeof obj == 'function' || false;
+ return typeof obj === 'function' || false;
};
}
@@ -209,7 +209,7 @@
function createSizePropertyCheck(getSizeProperty) {
return function(collection) {
var sizeProperty = getSizeProperty(collection);
- return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
+ return typeof sizeProperty === 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
}
}
@@ -297,7 +297,7 @@
// Skip the more expensive `toString`-based type checks if `obj` has no
// `.length`.
var length = getLength(obj);
- if (typeof length == 'number' && (
+ if (typeof length === 'number' && (
isArray(obj) || isString(obj) || isArguments$1(obj)
)) return length === 0;
return getLength(keys(obj)) === 0;
@@ -363,7 +363,7 @@
if (a !== a) return b !== b;
// Exhaust primitive checks
var type = typeof a;
- if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
+ if (type !== 'function' && type !== 'object' && typeof b !== 'object') return false;
return deepEq(a, b, aStack, bStack);
}
@@ -376,7 +376,7 @@
var className = toString.call(a);
if (className !== toString.call(b)) return false;
// Work around a bug in IE 10 - Edge 13.
- if (hasStringTagBug && className == '[object Object]' && isDataView$1(a)) {
+ if (hasStringTagBug && className === '[object Object]' && isDataView$1(a)) {
if (!isDataView$1(b)) return false;
className = tagDataView;
}
@@ -416,7 +416,7 @@
areArrays = true;
}
if (!areArrays) {
- if (typeof a != 'object' || typeof b != 'object') return false;
+ if (typeof a !== 'object' || typeof b !== 'object') return false;
// Objects with different constructors are not equivalent, but `Object`s or `Array`s
// from different frames are.
@@ -1274,7 +1274,7 @@
function createIndexFinder(dir, predicateFind, sortedIndex) {
return function(array, item, idx) {
var i = 0, length = getLength(array);
- if (typeof idx == 'number') {
+ if (typeof idx === 'number') {
if (dir > 0) {
i = idx >= 0 ? idx : Math.max(idx + length, i);
} else {
@@ -1425,7 +1425,7 @@
// Determine if the array or object contains a given item (using `===`).
function contains(obj, item, fromIndex, guard) {
if (!isArrayLike(obj)) obj = values(obj);
- if (typeof fromIndex != 'number' || guard) fromIndex = 0;
+ if (typeof fromIndex !== 'number' || guard) fromIndex = 0;
return indexOf(obj, item, fromIndex) >= 0;
}
@@ -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];
@@ -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];
diff --git a/underscore.js b/underscore.js
index c81e732e9..01c90ad5b 100644
--- a/underscore.js
+++ b/underscore.js
@@ -18,8 +18,8 @@
// 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')() ||
{};
@@ -137,9 +137,9 @@
// Optimize `isFunction` if appropriate. Work around some `typeof` bugs in old
// v8, IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).
var nodelist = root.document && root.document.childNodes;
- if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {
+ if (typeof /./ !== 'function' && typeof Int8Array !== 'object' && typeof nodelist !== 'function') {
isFunction = function(obj) {
- return typeof obj == 'function' || false;
+ return typeof obj === 'function' || false;
};
}
@@ -209,7 +209,7 @@
function createSizePropertyCheck(getSizeProperty) {
return function(collection) {
var sizeProperty = getSizeProperty(collection);
- return typeof sizeProperty == 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
+ return typeof sizeProperty === 'number' && sizeProperty >= 0 && sizeProperty <= MAX_ARRAY_INDEX;
}
}
@@ -297,7 +297,7 @@
// Skip the more expensive `toString`-based type checks if `obj` has no
// `.length`.
var length = getLength(obj);
- if (typeof length == 'number' && (
+ if (typeof length === 'number' && (
isArray(obj) || isString(obj) || isArguments$1(obj)
)) return length === 0;
return getLength(keys(obj)) === 0;
@@ -363,7 +363,7 @@
if (a !== a) return b !== b;
// Exhaust primitive checks
var type = typeof a;
- if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;
+ if (type !== 'function' && type !== 'object' && typeof b !== 'object') return false;
return deepEq(a, b, aStack, bStack);
}
@@ -376,7 +376,7 @@
var className = toString.call(a);
if (className !== toString.call(b)) return false;
// Work around a bug in IE 10 - Edge 13.
- if (hasStringTagBug && className == '[object Object]' && isDataView$1(a)) {
+ if (hasStringTagBug && className === '[object Object]' && isDataView$1(a)) {
if (!isDataView$1(b)) return false;
className = tagDataView;
}
@@ -416,7 +416,7 @@
areArrays = true;
}
if (!areArrays) {
- if (typeof a != 'object' || typeof b != 'object') return false;
+ if (typeof a !== 'object' || typeof b !== 'object') return false;
// Objects with different constructors are not equivalent, but `Object`s or `Array`s
// from different frames are.
@@ -1274,7 +1274,7 @@
function createIndexFinder(dir, predicateFind, sortedIndex) {
return function(array, item, idx) {
var i = 0, length = getLength(array);
- if (typeof idx == 'number') {
+ if (typeof idx === 'number') {
if (dir > 0) {
i = idx >= 0 ? idx : Math.max(idx + length, i);
} else {
@@ -1425,7 +1425,7 @@
// Determine if the array or object contains a given item (using `===`).
function contains(obj, item, fromIndex, guard) {
if (!isArrayLike(obj)) obj = values(obj);
- if (typeof fromIndex != 'number' || guard) fromIndex = 0;
+ if (typeof fromIndex !== 'number' || guard) fromIndex = 0;
return indexOf(obj, item, fromIndex) >= 0;
}
@@ -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];
@@ -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];