@whitesev/utils 2.11.12 → 2.11.14
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/dist/index.amd.js +16 -4
- package/dist/index.amd.js.map +1 -1
- package/dist/index.amd.min.js +1 -1
- package/dist/index.amd.min.js.map +1 -1
- package/dist/index.cjs.js +16 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.js +16 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/index.iife.js +16 -4
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +1 -1
- package/dist/index.iife.min.js.map +1 -1
- package/dist/index.system.js +16 -4
- package/dist/index.system.js.map +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/dist/index.umd.js +16 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/types/src/Dictionary.d.ts +13 -2
- package/dist/types/src/types/ajaxHooker.d.ts +98 -7
- package/package.json +1 -1
- package/src/Dictionary.ts +24 -3
- package/src/types/ajaxHooker.d.ts +98 -7
package/dist/index.system.js
CHANGED
|
@@ -242,7 +242,7 @@ System.register('Utils', [], (function (exports) {
|
|
|
242
242
|
const setInterval$1 = (...args) => loadOrReturnBroker().setInterval(...args);
|
|
243
243
|
const setTimeout$1 = (...args) => loadOrReturnBroker().setTimeout(...args);
|
|
244
244
|
|
|
245
|
-
const version = "2.11.
|
|
245
|
+
const version = "2.11.14";
|
|
246
246
|
|
|
247
247
|
/* eslint-disable */
|
|
248
248
|
// ==UserScript==
|
|
@@ -1923,13 +1923,25 @@ System.register('Utils', [], (function (exports) {
|
|
|
1923
1923
|
}
|
|
1924
1924
|
/**
|
|
1925
1925
|
* 迭代字典
|
|
1926
|
-
* @param
|
|
1926
|
+
* @param cb 回调函数
|
|
1927
1927
|
*/
|
|
1928
|
-
forEach(
|
|
1928
|
+
forEach(cb) {
|
|
1929
1929
|
this.items.forEach((value, key) => {
|
|
1930
|
-
|
|
1930
|
+
cb(value, key, this);
|
|
1931
1931
|
});
|
|
1932
1932
|
}
|
|
1933
|
+
/**
|
|
1934
|
+
* 找到字典中对应的键和值
|
|
1935
|
+
* @param cb 回调函数
|
|
1936
|
+
*/
|
|
1937
|
+
find(cb) {
|
|
1938
|
+
for (const [key, value] of this.items.entries()) {
|
|
1939
|
+
const result = cb(value, key, this);
|
|
1940
|
+
if (result) {
|
|
1941
|
+
return result;
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1933
1945
|
/**
|
|
1934
1946
|
* 检查已有的键中是否以xx开头
|
|
1935
1947
|
* @param key 需要匹配的键
|