ut2 1.11.6 → 1.12.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 +1 -1
- package/dist/ut2.js +5 -2
- package/dist/ut2.js.map +1 -1
- package/dist/ut2.min.js +1 -1
- package/dist/ut2.min.js.map +1 -1
- package/es/index.js +1 -0
- package/es/internals/helpers.js +1 -1
- package/es/list.js +22 -0
- package/es/times.js +2 -19
- package/lib/index.js +2 -0
- package/lib/internals/helpers.js +1 -1
- package/lib/list.js +24 -0
- package/lib/times.js +2 -19
- package/package.json +1 -1
- package/types/index.d.ts +1 -0
- package/types/isWindow.d.ts +1 -1
- package/types/list.d.ts +28 -0
- package/types/times.d.ts +4 -22
package/README.md
CHANGED
|
@@ -186,13 +186,13 @@ const debounced = debounce(() => {
|
|
|
186
186
|
- [gt](https://caijf.github.io/ut2/module-Util.html#.gt) - 大于。
|
|
187
187
|
- [gte](https://caijf.github.io/ut2/module-Util.html#.gte) - 大于等于
|
|
188
188
|
- [identity](https://caijf.github.io/ut2/module-Util.html#.identity) - 返回第一个参数的函数。
|
|
189
|
+
- [list](https://caijf.github.io/ut2/module-Util.html#.list) - 迭代执行次数。
|
|
189
190
|
- [lt](https://caijf.github.io/ut2/module-Util.html#.lt) - 小于。
|
|
190
191
|
- [lte](https://caijf.github.io/ut2/module-Util.html#.lte) - 小于等于。
|
|
191
192
|
- [noop](https://caijf.github.io/ut2/module-Util.html#.noop) - 空函数。
|
|
192
193
|
- [nthArg](https://caijf.github.io/ut2/module-Util.html#.nthArg) - 返回指定位置参数的函数。
|
|
193
194
|
- [range](https://caijf.github.io/ut2/module-Util.html#.range) - 创建升序或降序的数字数组。
|
|
194
195
|
- [sleep](https://caijf.github.io/ut2/module-Util.html#.sleep) - 返回 `promise` 延迟。
|
|
195
|
-
- [times](https://caijf.github.io/ut2/module-Util.html#.times) - 迭代执行次数。
|
|
196
196
|
- [toFinite](https://caijf.github.io/ut2/module-Util.html#.toFinite) - 转为有限数字。
|
|
197
197
|
- [toInteger](https://caijf.github.io/ut2/module-Util.html#.toInteger) - 转为整数。
|
|
198
198
|
- [toLength](https://caijf.github.io/ut2/module-Util.html#.toLength) - 转为数组长度整数。
|
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.
|
|
609
|
+
var VERSION = "1.12.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';
|
|
@@ -1744,7 +1744,7 @@
|
|
|
1744
1744
|
});
|
|
1745
1745
|
}
|
|
1746
1746
|
|
|
1747
|
-
var
|
|
1747
|
+
var list = function (n, iteratee) {
|
|
1748
1748
|
if (iteratee === void 0) { iteratee = identity; }
|
|
1749
1749
|
if (n < 1 || n > MAX_SAFE_INTEGER) {
|
|
1750
1750
|
return [];
|
|
@@ -1760,6 +1760,8 @@
|
|
|
1760
1760
|
return result;
|
|
1761
1761
|
};
|
|
1762
1762
|
|
|
1763
|
+
var times = list;
|
|
1764
|
+
|
|
1763
1765
|
function toSafeInteger(value) {
|
|
1764
1766
|
if (!value) {
|
|
1765
1767
|
return value === 0 ? value : 0;
|
|
@@ -1867,6 +1869,7 @@
|
|
|
1867
1869
|
exports.keyBy = keyBy;
|
|
1868
1870
|
exports.keys = keys;
|
|
1869
1871
|
exports.keysIn = keysIn;
|
|
1872
|
+
exports.list = list;
|
|
1870
1873
|
exports.lowerCase = lowerCase;
|
|
1871
1874
|
exports.lowerFirst = lowerFirst;
|
|
1872
1875
|
exports.lt = lt;
|