From 5e58cd216c567f0bccfc2058f5a5ed0d2948333e Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 2 Feb 2018 20:30:15 -0800 Subject: [PATCH] Fix style nits. --- lodash.js | 8 ++++---- test/test-fp.js | 2 +- test/test.js | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lodash.js b/lodash.js index 932c1671f..6aa209863 100644 --- a/lodash.js +++ b/lodash.js @@ -2674,7 +2674,7 @@ stack.set(value, result); if (isSet(value)) { - value.forEach(function(subValue) { + value.forEach(function(subValue) { result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); }); @@ -6270,13 +6270,13 @@ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ function isIndex(value, length) { - var type = typeof value - length = length == null ? MAX_SAFE_INTEGER : length + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (type == 'number' || (type != 'symbol' && reIsUint.test(value))) && - (value > -1 && value % 1 == 0 && value < length) + (value > -1 && value % 1 == 0 && value < length); } /** diff --git a/test/test-fp.js b/test/test-fp.js index dbc035258..a41134ca7 100644 --- a/test/test-fp.js +++ b/test/test-fp.js @@ -2144,7 +2144,7 @@ var object = { 'a': { 'b': _.constant(true) } }, actual = fp.update('a.b')(_.identity)(object); - assert.strictEqual(typeof object.a.b, 'function') + assert.strictEqual(typeof object.a.b, 'function'); assert.strictEqual(object.a.b, actual.a.b); }); diff --git a/test/test.js b/test/test.js index a87c892c7..c88e0fda9 100644 --- a/test/test.js +++ b/test/test.js @@ -2958,7 +2958,7 @@ assert.deepEqual(getSymbols(actual.a.b), [symbol]); assert.deepEqual(actual.a.b[symbol], object.a.b[symbol]); assert.deepEqual(actual.a.b[symbol2], object.a.b[symbol2]); - assert.deepEqual(actual.a.b[symbol3], object.a.b[symbol3]) + assert.deepEqual(actual.a.b[symbol3], object.a.b[symbol3]); } else { skipAssert(assert, 7); @@ -7546,7 +7546,7 @@ if (JSON) { _.merge({}, JSON.parse('{"__proto__":{"a":1}}')); - var actual = "a" in objectProto; + var actual = 'a' in objectProto; delete objectProto.a; assert.notOk(actual);