ut2 1.21.0 → 1.21.1

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.
@@ -2,7 +2,7 @@ import isObjectLike from '../isObjectLike.js';
2
2
  import getTag from './getTag.js';
3
3
  import { argumentsTag, functionProtoToString, stringUndefined } from './native.js';
4
4
 
5
- var VERSION = "1.21.0";
5
+ var VERSION = "1.21.1";
6
6
  var isBrowser = typeof window !== stringUndefined && isObjectLike(window) && typeof document !== stringUndefined && isObjectLike(document) && window.document === document;
7
7
  var supportedArgumentsType = getTag((function () { return arguments; })()) === argumentsTag;
8
8
  var FUNC_ERROR_TEXT = 'Expected a function';
@@ -14,13 +14,13 @@ var mapCtorString = helpers.toSource(Map);
14
14
  var promiseCtorString = helpers.toSource(Promise);
15
15
  var setCtorString = helpers.toSource(Set);
16
16
  var weakMapCtorString = helpers.toSource(WeakMap);
17
- var getTagWithBugfix = getTag;
17
+ var getTagWithBugfix$1 = getTag;
18
18
  if ((dataViewExisted && getTag(new DataView(new ArrayBuffer(1))) !== native.dataViewTag) ||
19
19
  (mapExisted && getTag(new Map()) !== native.mapTag) ||
20
20
  (promiseExisted && getTag(Promise.resolve()) !== native.promiseTag) ||
21
21
  (setExisted && getTag(new Set()) !== native.setTag) ||
22
22
  (weakMapExisted && getTag(new WeakMap()) !== native.weakMapTag)) {
23
- getTagWithBugfix = function (value) {
23
+ getTagWithBugfix$1 = function (value) {
24
24
  var result = getTag(value);
25
25
  var Ctor = result === native.objectTag ? value.constructor : native.nativeUndefined;
26
26
  var ctorString = Ctor ? helpers.toSource(Ctor) : '';
@@ -41,6 +41,6 @@ if ((dataViewExisted && getTag(new DataView(new ArrayBuffer(1))) !== native.data
41
41
  return result;
42
42
  };
43
43
  }
44
- var getTagWithBugfix$1 = getTagWithBugfix;
44
+ var getTagWithBugfix = getTagWithBugfix$1;
45
45
 
46
- module.exports = getTagWithBugfix$1;
46
+ module.exports = getTagWithBugfix;
@@ -4,7 +4,7 @@ var isObjectLike = require('../isObjectLike.js');
4
4
  var getTag = require('./getTag.js');
5
5
  var native = require('./native.js');
6
6
 
7
- var VERSION = "1.21.0";
7
+ var VERSION = "1.21.1";
8
8
  var isBrowser = typeof window !== native.stringUndefined && isObjectLike(window) && typeof document !== native.stringUndefined && isObjectLike(document) && window.document === document;
9
9
  var supportedArgumentsType = getTag((function () { return arguments; })()) === native.argumentsTag;
10
10
  var FUNC_ERROR_TEXT = 'Expected a function';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ut2",
3
- "version": "1.21.0",
3
+ "version": "1.21.1",
4
4
  "author": "caijf",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",
@@ -62,32 +62,32 @@
62
62
  "@commitlint/cli": "^19.8.1",
63
63
  "@commitlint/config-conventional": "^19.8.1",
64
64
  "@commitlint/cz-commitlint": "^19.8.1",
65
- "@eslint/js": "^9.31.0",
66
- "@rollup/plugin-commonjs": "^28.0.6",
67
- "@rollup/plugin-node-resolve": "^16.0.1",
68
- "@rollup/plugin-replace": "^6.0.2",
65
+ "@eslint/js": "^9.39.2",
66
+ "@rollup/plugin-commonjs": "^28.0.9",
67
+ "@rollup/plugin-node-resolve": "^16.0.3",
68
+ "@rollup/plugin-replace": "^6.0.3",
69
69
  "@rollup/plugin-terser": "^0.4.4",
70
- "@rollup/plugin-typescript": "^12.1.4",
70
+ "@rollup/plugin-typescript": "^12.3.0",
71
71
  "@types/jest": "^30.0.0",
72
- "@types/node": "^20.19.9",
72
+ "@types/node": "^20.19.27",
73
73
  "benchmark": "^2.1.4",
74
74
  "commitizen": "^4.3.1",
75
75
  "cross-env": "^7.0.3",
76
- "dayjs": "^1.11.13",
76
+ "dayjs": "^1.11.19",
77
77
  "docdash": "^2.0.2",
78
- "eslint": "^9.31.0",
79
- "globals": "^16.3.0",
78
+ "eslint": "^9.39.2",
79
+ "globals": "^16.5.0",
80
80
  "husky": "^9.1.7",
81
- "jest": "^30.0.5",
82
- "jest-environment-jsdom": "^30.0.5",
83
- "jsdoc": "^4.0.4",
81
+ "jest": "^30.2.0",
82
+ "jest-environment-jsdom": "^30.2.0",
83
+ "jsdoc": "^4.0.5",
84
84
  "lint-staged": "^15.5.2",
85
85
  "lodash": "^4.17.21",
86
- "prettier": "^3.6.2",
87
- "rollup": "^4.45.1",
88
- "ts-jest": "^29.4.0",
89
- "typescript": "^5.8.3",
90
- "typescript-eslint": "^8.38.0",
86
+ "prettier": "^3.7.4",
87
+ "rollup": "^4.54.0",
88
+ "ts-jest": "^29.4.6",
89
+ "typescript": "^5.9.3",
90
+ "typescript-eslint": "^8.51.0",
91
91
  "underscore": "^1.13.7"
92
92
  },
93
93
  "engines": {
@@ -13,6 +13,7 @@ interface CountBy {
13
13
  * @function
14
14
  * @alias module:Collection.countBy
15
15
  * @since 1.0.0
16
+ * @requires module:Collection.forEach
16
17
  * @param {ArrayLike<any> | object} collection 一个用来迭代的集合。
17
18
  * @param {Function | string | number | Symbol} [iteratee=identity] 迭代函数,用来转换键。
18
19
  * @returns {Object} 组成集合对象。
package/types/every.d.ts CHANGED
@@ -13,6 +13,7 @@ interface Every {
13
13
  * @function
14
14
  * @alias module:Collection.every
15
15
  * @since 1.7.0
16
+ * @requires module:Collection.forEach
16
17
  * @param {ArrayLike<any> | Object} collection 要迭代的集合。
17
18
  * @param {function} [predicate=identity] 每次迭代调用的函数。默认 `identity`。
18
19
  * @returns {boolean} 如果全部元素都通过 `predicate` 测试,则返回 `true`,否则返回 `false`。
package/types/filter.d.ts CHANGED
@@ -12,6 +12,7 @@ interface Filter {
12
12
  *
13
13
  * @alias module:Collection.filter
14
14
  * @since 1.7.0
15
+ * @requires module:Collection.forEach
15
16
  * @param {ArrayLike<any> | Object} collection 要迭代的集合。
16
17
  * @param {function} [predicate=identity] 每次迭代调用的函数。默认 `identity`。
17
18
  * @returns {Array} 返回新的过滤数组。
package/types/find.d.ts CHANGED
@@ -13,6 +13,7 @@ interface Find {
13
13
  * @function
14
14
  * @alias module:Collection.find
15
15
  * @since 1.7.0
16
+ * @requires module:Collection.forEach
16
17
  * @param {ArrayLike<any> | Object} collection 要迭代的集合。
17
18
  * @param {function} [predicate=identity] 每次迭代调用的函数。默认 `identity`。
18
19
  * @returns {ArrayLike<any> | Object} 返回第一个通过 `predicate` 返回真值的元素,否则返回 `undefined`。
@@ -8,6 +8,7 @@
8
8
  * @function
9
9
  * @alias module:Collection.forEach
10
10
  * @since 1.7.0
11
+ * @requires module:Object.allKeys
11
12
  * @param {ArrayLike<any> | Object} collection 要迭代的集合。
12
13
  * @param {Function} [iteratee=identity] 每次迭代调用的函数。默认 `identity`。
13
14
  * @returns {ArrayLike<any> | Object} 迭代集合本身。
@@ -8,6 +8,7 @@
8
8
  * @function
9
9
  * @alias module:Collection.forEachRight
10
10
  * @since 1.7.0
11
+ * @requires module:Object.allKeys
11
12
  * @param {ArrayLike<any> | Object} collection 要迭代的集合。
12
13
  * @param {Function} [iteratee=identity] 每次迭代调用的函数。默认 `identity`。
13
14
  * @returns {ArrayLike<any> | Object} 迭代集合本身。
@@ -12,6 +12,7 @@ interface GroupBy {
12
12
  *
13
13
  * @alias module:Collection.groupBy
14
14
  * @since 1.0.0
15
+ * @requires module:Collection.forEach
15
16
  * @param {ArrayLike<any> | Object} collection 一个用来迭代的集合。
16
17
  * @param {Function | string | number | Symbol} [iteratee=identity] 迭代函数,用来转换键。默认 `identity`。
17
18
  * @returns {Object} 组成聚合对象。
package/types/isNil.d.ts CHANGED
@@ -19,5 +19,5 @@
19
19
  *
20
20
  * isNil(1); // false
21
21
  */
22
- declare function isNil(value: any): value is undefined | null;
22
+ declare function isNil(value: any): value is undefined;
23
23
  export default isNil;
@@ -1,4 +1,3 @@
1
- import { FunctionAny } from './internals/types';
2
1
  /**
3
2
  * 检查值是否为对象。(例如,数组、函数、对象、正则表达式、new Number(0) 和 new String(''))。
4
3
  *
@@ -18,5 +17,5 @@ import { FunctionAny } from './internals/types';
18
17
  * isObject(null); // false
19
18
  *
20
19
  */
21
- declare function isObject(value: any): value is object | FunctionAny;
20
+ declare function isObject(value: any): value is object;
22
21
  export default isObject;
@@ -16,5 +16,5 @@
16
16
  * isPromiseLike([]); // false
17
17
  *
18
18
  */
19
- declare function isPromiseLike(value: any): value is Promise<any> | PromiseLike<any>;
19
+ declare function isPromiseLike(value: any): value is Promise<any>;
20
20
  export default isPromiseLike;
package/types/keyBy.d.ts CHANGED
@@ -13,6 +13,7 @@ interface KeyBy {
13
13
  * @function
14
14
  * @alias module:Collection.keyBy
15
15
  * @since 1.0.0
16
+ * @requires module:Collection.forEach
16
17
  * @param {ArrayLike<any> | Object} collection 一个用来迭代的集合。
17
18
  * @param {Function | string | number | Symbol} [iteratee=identity] 迭代函数,用来转换键。默认 `identity`。
18
19
  * @returns {Object} 组成聚合对象。
package/types/map.d.ts CHANGED
@@ -12,6 +12,7 @@ interface Map {
12
12
  *
13
13
  * @alias module:Collection.map
14
14
  * @since 1.7.0
15
+ * @requires module:Collection.forEach
15
16
  * @param {ArrayLike<any> | Object} collection 要迭代的集合。
16
17
  * @param {function} [iteratee=identity] 每次迭代调用的函数。默认 `identity`。
17
18
  * @returns {Array} 一个新数组。
@@ -16,6 +16,7 @@ interface OrderBy {
16
16
  * @function
17
17
  * @alias module:Collection.orderBy
18
18
  * @since 1.0.0
19
+ * @requires module:Collection.forEach
19
20
  * @see {@link https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Array/sort sort}
20
21
  * @param {ArrayLike<any> | Object} collection 一个用来迭代的集合。
21
22
  * @param {Function | string | number | Symbol | Array} [iteratees] 排序的迭代函数。
@@ -12,6 +12,7 @@ interface Partition {
12
12
  *
13
13
  * @alias module:Collection.partition
14
14
  * @since 1.0.0
15
+ * @requires module:Collection.forEach
15
16
  * @see {@link https://developer.mozilla.org/zh-CN/docs/Glossary/Truthy Truthy}
16
17
  * @see {@link https://developer.mozilla.org/zh-CN/docs/Glossary/Falsy Falsy}
17
18
  * @param {ArrayLike<any> | Object} collection 一个用来迭代的集合。
package/types/reduce.d.ts CHANGED
@@ -8,6 +8,7 @@
8
8
  * @function
9
9
  * @alias module:Collection.reduce
10
10
  * @since 1.7.0
11
+ * @requires module:Object.allKeys
11
12
  * @param {ArrayLike<any> | Object} collection 要迭代的集合。
12
13
  * @param {Function} [iteratee=identity] 每次迭代调用的函数。默认 `identity`。
13
14
  * @param {*} [initialValue] 初始值。
@@ -8,6 +8,7 @@
8
8
  * @function
9
9
  * @alias module:Collection.reduceRight
10
10
  * @since 1.7.0
11
+ * @requires module:Object.allKeys
11
12
  * @param {ArrayLike<any> | Object} collection 要迭代的集合。
12
13
  * @param {Function} [iteratee=identity] 每次迭代调用的函数。默认 `identity`。
13
14
  * @param {*} [initialValue] 初始值。
package/types/some.d.ts CHANGED
@@ -13,6 +13,7 @@ interface Some {
13
13
  * @function
14
14
  * @alias module:Collection.some
15
15
  * @since 1.7.0
16
+ * @requires module:Collection.forEach
16
17
  * @param {ArrayLike<any> | Object} collection 要迭代的集合。
17
18
  * @param {function} [predicate=identity] 每次迭代调用的函数。默认 `identity`。
18
19
  * @returns {boolean} 如果任一元素通过 `predicate` 测试,则返回 `true`,否则返回 `false`。