ut2 1.5.5 → 1.5.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/ut2.js +5 -5
- package/dist/ut2.js.map +1 -1
- package/dist/ut2.min.js +1 -1
- package/dist/ut2.min.js.map +1 -1
- package/es/internals/helpers.js +1 -1
- package/es/merge.js +5 -4
- package/lib/internals/helpers.js +1 -1
- package/lib/merge.js +5 -4
- package/package.json +1 -1
- package/types/lowerFirst.d.ts +4 -0
- package/types/upperFirst.d.ts +4 -0
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
一个现代 JavaScript 实用工具库。[点击查看在线文档]。
|
|
4
4
|
|
|
5
|
-
[![npm][npm]][npm-url] [](https://github.com/caijf/ut2/actions/workflows/ci.yml) [](https://codecov.io/gh/caijf/ut2) [](https://
|
|
5
|
+
[![npm][npm]][npm-url] [](https://github.com/caijf/ut2/actions/workflows/ci.yml) [](https://codecov.io/gh/caijf/ut2) [](https://s57jpy.csb.app/)  
|
|
6
6
|
|
|
7
7
|
## 比较
|
|
8
8
|
|
package/dist/ut2.js
CHANGED
|
@@ -499,7 +499,7 @@
|
|
|
499
499
|
return value == null || value !== value ? defaultValue : value;
|
|
500
500
|
}
|
|
501
501
|
|
|
502
|
-
var VERSION = "1.5.
|
|
502
|
+
var VERSION = "1.5.6";
|
|
503
503
|
var supportedArgumentsType = getTag((function () { return arguments; })()) === argumentsTag;
|
|
504
504
|
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
505
505
|
function toSource(func) {
|
|
@@ -1351,17 +1351,17 @@
|
|
|
1351
1351
|
if (newValue === undefined) {
|
|
1352
1352
|
newValue = srcValue;
|
|
1353
1353
|
}
|
|
1354
|
-
if (isObjectLike(newValue) &&
|
|
1354
|
+
if (isObjectLike(newValue) && !storage.has(newValue)) {
|
|
1355
1355
|
storage.set(newValue, true);
|
|
1356
1356
|
var objValue = obj[key];
|
|
1357
1357
|
var newObjValue = void 0;
|
|
1358
1358
|
if (isArray(newValue)) {
|
|
1359
1359
|
newObjValue = isArray(objValue) ? objValue : [];
|
|
1360
1360
|
}
|
|
1361
|
-
else {
|
|
1362
|
-
newObjValue =
|
|
1361
|
+
else if (isPlainObject(newValue)) {
|
|
1362
|
+
newObjValue = isPlainObject(objValue) ? objValue : {};
|
|
1363
1363
|
}
|
|
1364
|
-
obj[key] = baseMerge(newObjValue, newValue, customizer, storage);
|
|
1364
|
+
obj[key] = newObjValue ? baseMerge(newObjValue, newValue, customizer, storage) : newValue;
|
|
1365
1365
|
}
|
|
1366
1366
|
else {
|
|
1367
1367
|
if (newValue !== undefined || (newValue === undefined && !(key in obj))) {
|