ut2 1.14.0 → 1.15.0

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 CHANGED
@@ -64,7 +64,6 @@ const debounced = debounce(() => {
64
64
  - [chunk](https://caijf.github.io/ut2/module-Array.html#.chunk) - 拆分成多个 `size` 长度的区块。
65
65
  - [compact](https://caijf.github.io/ut2/module-Array.html#.compact) - 剔除假值元素。
66
66
  - [difference](https://caijf.github.io/ut2/module-Array.html#.difference) - 排除部分值。
67
- - [formPairs](https://caijf.github.io/ut2/module-Array.html#.fromPairs) - 将键值对转为对象。
68
67
  - [intersection](https://caijf.github.io/ut2/module-Array.html#.intersection) - 交集去重。
69
68
  - [move](https://caijf.github.io/ut2/module-Array.html#.move) - 数组元素移动。
70
69
  - [nth](https://caijf.github.io/ut2/module-Array.html#.nth) - 获取第 `n` 个元素。
package/dist/ut2.js CHANGED
@@ -606,7 +606,7 @@
606
606
  return value == null || value !== value ? defaultValue : value;
607
607
  };
608
608
 
609
- var VERSION = "1.14.0";
609
+ var VERSION = "1.15.0";
610
610
  var isBrowser = typeof window !== stringUndefined && isObjectLike(window) && typeof document !== stringUndefined && isObjectLike(document) && window.document === document;
611
611
  var supportedArgumentsType = getTag((function () { return arguments; })()) === argumentsTag;
612
612
  var FUNC_ERROR_TEXT = 'Expected a function';
@@ -1641,6 +1641,19 @@
1641
1641
  }
1642
1642
  merge.NOT_MERGE_ARRAYS = function (objValue, srcValue) { return (isArray(srcValue) ? srcValue : undefined); };
1643
1643
 
1644
+ var mergeObject = function (object, source) {
1645
+ var args = [];
1646
+ for (var _i = 2; _i < arguments.length; _i++) {
1647
+ args[_i - 2] = arguments[_i];
1648
+ }
1649
+ if (args.length > 0) {
1650
+ var _a = __read(args), arg1 = _a[0], restArgs = _a.slice(1);
1651
+ var obj = merge(object, source, merge.NOT_MERGE_ARRAYS);
1652
+ return mergeObject.apply(void 0, __spreadArray([obj, arg1], __read(restArgs), false));
1653
+ }
1654
+ return merge(object, source, merge.NOT_MERGE_ARRAYS);
1655
+ };
1656
+
1644
1657
  function castArray(value) {
1645
1658
  if (!arguments.length) {
1646
1659
  return [];
@@ -2090,6 +2103,7 @@
2090
2103
  exports.map = map;
2091
2104
  exports.max = max;
2092
2105
  exports.merge = merge;
2106
+ exports.mergeObject = mergeObject;
2093
2107
  exports.min = min;
2094
2108
  exports.move = move;
2095
2109
  exports.negate = negate;