Skip to content

Commit b93c3b1

Browse files
committed
Bump to v4.17.3.
1 parent db9697d commit b93c3b1

33 files changed

+372
-331
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# lodash v4.17.2
1+
# lodash v4.17.3
22

33
The [Lodash](https://lodash.com/) library exported as [Node.js](https://nodejs.org/) modules.
44

@@ -28,12 +28,12 @@ var at = require('lodash/at');
2828
var curryN = require('lodash/fp/curryN');
2929
```
3030

31-
See the [package source](https://github.com/lodash/lodash/tree/4.17.2-npm) for more details.
31+
See the [package source](https://github.com/lodash/lodash/tree/4.17.3-npm) for more details.
3232

3333
**Note:**<br>
3434
Install [n_](https://www.npmjs.com/package/n_) for Lodash use in the Node.js < 6 REPL.
3535

3636
## Support
3737

38-
Tested in Chrome 53-54, Firefox 48-49, IE 11, Edge 14, Safari 9-10, Node.js 6-7, & PhantomJS 2.1.1.<br>
38+
Tested in Chrome 54-55, Firefox 49-50, IE 11, Edge 14, Safari 9-10, Node.js 6-7, & PhantomJS 2.1.1.<br>
3939
Automated [browser](https://saucelabs.com/u/lodash) & [CI](https://travis-ci.org/lodash/lodash/) test runs are available.

_baseGetTag.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ function baseGetTag(value) {
2020
if (value == null) {
2121
return value === undefined ? undefinedTag : nullTag;
2222
}
23-
value = Object(value);
24-
return (symToStringTag && symToStringTag in value)
23+
return (symToStringTag && symToStringTag in Object(value))
2524
? getRawTag(value)
2625
: objectToString(value);
2726
}

_baseIsEqual.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
var baseIsEqualDeep = require('./_baseIsEqualDeep'),
2-
isObject = require('./isObject'),
32
isObjectLike = require('./isObjectLike');
43

54
/**
@@ -20,7 +19,7 @@ function baseIsEqual(value, other, bitmask, customizer, stack) {
2019
if (value === other) {
2120
return true;
2221
}
23-
if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
22+
if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
2423
return value !== value && other !== other;
2524
}
2625
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);

_baseIsEqualDeep.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,12 @@ var hasOwnProperty = objectProto.hasOwnProperty;
3838
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
3939
var objIsArr = isArray(object),
4040
othIsArr = isArray(other),
41-
objTag = arrayTag,
42-
othTag = arrayTag;
41+
objTag = objIsArr ? arrayTag : getTag(object),
42+
othTag = othIsArr ? arrayTag : getTag(other);
43+
44+
objTag = objTag == argsTag ? objectTag : objTag;
45+
othTag = othTag == argsTag ? objectTag : othTag;
4346

44-
if (!objIsArr) {
45-
objTag = getTag(object);
46-
objTag = objTag == argsTag ? objectTag : objTag;
47-
}
48-
if (!othIsArr) {
49-
othTag = getTag(other);
50-
othTag = othTag == argsTag ? objectTag : othTag;
51-
}
5247
var objIsObj = objTag == objectTag,
5348
othIsObj = othTag == objectTag,
5449
isSameTag = objTag == othTag;

_basePick.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ var basePickBy = require('./_basePickBy'),
1111
* @returns {Object} Returns the new object.
1212
*/
1313
function basePick(object, paths) {
14-
object = Object(object);
1514
return basePickBy(object, paths, function(value, path) {
1615
return hasIn(object, path);
1716
});

_createFlow.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ var LodashWrapper = require('./_LodashWrapper'),
55
isArray = require('./isArray'),
66
isLaziable = require('./_isLaziable');
77

8-
/** Used as the size to enable large array optimizations. */
9-
var LARGE_ARRAY_SIZE = 200;
10-
118
/** Error message constants. */
129
var FUNC_ERROR_TEXT = 'Expected a function';
1310

@@ -64,8 +61,7 @@ function createFlow(fromRight) {
6461
var args = arguments,
6562
value = args[0];
6663

67-
if (wrapper && args.length == 1 &&
68-
isArray(value) && value.length >= LARGE_ARRAY_SIZE) {
64+
if (wrapper && args.length == 1 && isArray(value)) {
6965
return wrapper.plant(value).value();
7066
}
7167
var index = 0,

_createRound.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function createRound(methodName) {
1616
var func = Math[methodName];
1717
return function(number, precision) {
1818
number = toNumber(number);
19-
precision = nativeMin(toInteger(precision), 292);
19+
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
2020
if (precision) {
2121
// Shift with exponential notation to avoid floating-point issues.
2222
// See [MDN](https://mdn.io/round#Examples) for more details.

_createWrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arit
8383
thisArg = newData[2];
8484
partials = newData[3];
8585
holders = newData[4];
86-
arity = newData[9] = newData[9] == null
86+
arity = newData[9] = newData[9] === undefined
8787
? (isBindKey ? 0 : func.length)
8888
: nativeMax(newData[9] - length, 0);
8989

_assignInDefaults.js renamed to _customDefaultsAssignIn.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ var objectProto = Object.prototype;
77
var hasOwnProperty = objectProto.hasOwnProperty;
88

99
/**
10-
* Used by `_.defaults` to customize its `_.assignIn` use.
10+
* Used by `_.defaults` to customize its `_.assignIn` use to assign properties
11+
* of source objects to the destination object for all destination properties
12+
* that resolve to `undefined`.
1113
*
1214
* @private
1315
* @param {*} objValue The destination value.
@@ -16,12 +18,12 @@ var hasOwnProperty = objectProto.hasOwnProperty;
1618
* @param {Object} object The parent object of `objValue`.
1719
* @returns {*} Returns the value to assign.
1820
*/
19-
function assignInDefaults(objValue, srcValue, key, object) {
21+
function customDefaultsAssignIn(objValue, srcValue, key, object) {
2022
if (objValue === undefined ||
2123
(eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
2224
return srcValue;
2325
}
2426
return objValue;
2527
}
2628

27-
module.exports = assignInDefaults;
29+
module.exports = customDefaultsAssignIn;

_mergeDefaults.js renamed to _customDefaultsMerge.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ var baseMerge = require('./_baseMerge'),
22
isObject = require('./isObject');
33

44
/**
5-
* Used by `_.defaultsDeep` to customize its `_.merge` use.
5+
* Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
6+
* objects into destination objects that are passed thru.
67
*
78
* @private
89
* @param {*} objValue The destination value.
@@ -14,14 +15,14 @@ var baseMerge = require('./_baseMerge'),
1415
* counterparts.
1516
* @returns {*} Returns the value to assign.
1617
*/
17-
function mergeDefaults(objValue, srcValue, key, object, source, stack) {
18+
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
1819
if (isObject(objValue) && isObject(srcValue)) {
1920
// Recursively merge objects and arrays (susceptible to call stack limits).
2021
stack.set(srcValue, objValue);
21-
baseMerge(objValue, srcValue, undefined, mergeDefaults, stack);
22+
baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
2223
stack['delete'](srcValue);
2324
}
2425
return objValue;
2526
}
2627

27-
module.exports = mergeDefaults;
28+
module.exports = customDefaultsMerge;

0 commit comments

Comments
 (0)