Skip to content

Commit c7a7540

Browse files
committed
Bump to v4.17.3.
1 parent 0c27706 commit c7a7540

28 files changed

+195
-152
lines changed

README.md

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

33
The [Lodash](https://lodash.com/) library exported as [AMD](https://github.com/amdjs/amdjs-api/wiki/AMD) modules.
44

@@ -27,4 +27,4 @@ require({
2727
});
2828
```
2929

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

_baseGetTag.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ define(['./_Symbol', './_getRawTag', './_objectToString'], function(Symbol, getR
2121
if (value == null) {
2222
return value === undefined ? undefinedTag : nullTag;
2323
}
24-
value = Object(value);
25-
return (symToStringTag && symToStringTag in value)
24+
return (symToStringTag && symToStringTag in Object(value))
2625
? getRawTag(value)
2726
: objectToString(value);
2827
}

_baseIsEqual.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
define(['./_baseIsEqualDeep', './isObject', './isObjectLike'], function(baseIsEqualDeep, isObject, isObjectLike) {
1+
define(['./_baseIsEqualDeep', './isObjectLike'], function(baseIsEqualDeep, isObjectLike) {
22

33
/**
44
* The base implementation of `_.isEqual` which supports partial comparisons
@@ -18,7 +18,7 @@ define(['./_baseIsEqualDeep', './isObject', './isObjectLike'], function(baseIsEq
1818
if (value === other) {
1919
return true;
2020
}
21-
if (value == null || other == null || (!isObject(value) && !isObjectLike(other))) {
21+
if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
2222
return value !== value && other !== other;
2323
}
2424
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);

_baseIsEqualDeep.js

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,12 @@ define(['./_Stack', './_equalArrays', './_equalByTag', './_equalObjects', './_ge
3131
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
3232
var objIsArr = isArray(object),
3333
othIsArr = isArray(other),
34-
objTag = arrayTag,
35-
othTag = arrayTag;
34+
objTag = objIsArr ? arrayTag : getTag(object),
35+
othTag = othIsArr ? arrayTag : getTag(other);
36+
37+
objTag = objTag == argsTag ? objectTag : objTag;
38+
othTag = othTag == argsTag ? objectTag : othTag;
3639

37-
if (!objIsArr) {
38-
objTag = getTag(object);
39-
objTag = objTag == argsTag ? objectTag : objTag;
40-
}
41-
if (!othIsArr) {
42-
othTag = getTag(other);
43-
othTag = othTag == argsTag ? objectTag : othTag;
44-
}
4540
var objIsObj = objTag == objectTag,
4641
othIsObj = othTag == objectTag,
4742
isSameTag = objTag == othTag;

_basePick.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ define(['./_basePickBy', './hasIn'], function(basePickBy, hasIn) {
1010
* @returns {Object} Returns the new object.
1111
*/
1212
function basePick(object, paths) {
13-
object = Object(object);
1413
return basePickBy(object, paths, function(value, path) {
1514
return hasIn(object, path);
1615
});

_createFlow.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ define(['./_LodashWrapper', './_flatRest', './_getData', './_getFuncName', './is
33
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
44
var undefined;
55

6-
/** Used as the size to enable large array optimizations. */
7-
var LARGE_ARRAY_SIZE = 200;
8-
96
/** Error message constants. */
107
var FUNC_ERROR_TEXT = 'Expected a function';
118

@@ -62,8 +59,7 @@ define(['./_LodashWrapper', './_flatRest', './_getData', './_getFuncName', './is
6259
var args = arguments,
6360
value = args[0];
6461

65-
if (wrapper && args.length == 1 &&
66-
isArray(value) && value.length >= LARGE_ARRAY_SIZE) {
62+
if (wrapper && args.length == 1 && isArray(value)) {
6763
return wrapper.plant(value).value();
6864
}
6965
var index = 0,

_createRound.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ define(['./toInteger', './toNumber', './toString'], function(toInteger, toNumber
1414
var func = Math[methodName];
1515
return function(number, precision) {
1616
number = toNumber(number);
17-
precision = nativeMin(toInteger(precision), 292);
17+
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
1818
if (precision) {
1919
// Shift with exponential notation to avoid floating-point issues.
2020
// 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
@@ -77,7 +77,7 @@ define(['./_baseSetData', './_createBind', './_createCurry', './_createHybrid',
7777
thisArg = newData[2];
7878
partials = newData[3];
7979
holders = newData[4];
80-
arity = newData[9] = newData[9] == null
80+
arity = newData[9] = newData[9] === undefined
8181
? (isBindKey ? 0 : func.length)
8282
: nativeMax(newData[9] - length, 0);
8383

_assignInDefaults.js renamed to _customDefaultsAssignIn.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ define(['./eq'], function(eq) {
1010
var hasOwnProperty = objectProto.hasOwnProperty;
1111

1212
/**
13-
* Used by `_.defaults` to customize its `_.assignIn` use.
13+
* Used by `_.defaults` to customize its `_.assignIn` use to assign properties
14+
* of source objects to the destination object for all destination properties
15+
* that resolve to `undefined`.
1416
*
1517
* @private
1618
* @param {*} objValue The destination value.
@@ -19,13 +21,13 @@ define(['./eq'], function(eq) {
1921
* @param {Object} object The parent object of `objValue`.
2022
* @returns {*} Returns the value to assign.
2123
*/
22-
function assignInDefaults(objValue, srcValue, key, object) {
24+
function customDefaultsAssignIn(objValue, srcValue, key, object) {
2325
if (objValue === undefined ||
2426
(eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
2527
return srcValue;
2628
}
2729
return objValue;
2830
}
2931

30-
return assignInDefaults;
32+
return customDefaultsAssignIn;
3133
});

_mergeDefaults.js renamed to _customDefaultsMerge.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ define(['./_baseMerge', './isObject'], function(baseMerge, isObject) {
44
var undefined;
55

66
/**
7-
* Used by `_.defaultsDeep` to customize its `_.merge` use.
7+
* Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
8+
* objects into destination objects that are passed thru.
89
*
910
* @private
1011
* @param {*} objValue The destination value.
@@ -16,15 +17,15 @@ define(['./_baseMerge', './isObject'], function(baseMerge, isObject) {
1617
* counterparts.
1718
* @returns {*} Returns the value to assign.
1819
*/
19-
function mergeDefaults(objValue, srcValue, key, object, source, stack) {
20+
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
2021
if (isObject(objValue) && isObject(srcValue)) {
2122
// Recursively merge objects and arrays (susceptible to call stack limits).
2223
stack.set(srcValue, objValue);
23-
baseMerge(objValue, srcValue, undefined, mergeDefaults, stack);
24+
baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
2425
stack['delete'](srcValue);
2526
}
2627
return objValue;
2728
}
2829

29-
return mergeDefaults;
30+
return customDefaultsMerge;
3031
});

0 commit comments

Comments
 (0)