umt 2.15.0 → 2.17.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 +42 -0
- package/module/Array/chunk.js.map +1 -1
- package/module/Array/uniqBy.js.map +1 -1
- package/module/Async/debounceAsync.d.ts +18 -0
- package/module/Async/debounceAsync.js +59 -0
- package/module/Async/debounceAsync.js.map +1 -0
- package/module/Async/index.d.ts +5 -0
- package/module/Async/index.js +5 -0
- package/module/Async/index.js.map +1 -1
- package/module/Async/pSettled.d.ts +19 -0
- package/module/Async/pSettled.js +54 -0
- package/module/Async/pSettled.js.map +1 -0
- package/module/Async/retry.d.ts +22 -0
- package/module/Async/retry.js +49 -0
- package/module/Async/retry.js.map +1 -0
- package/module/Async/throttleAsync.d.ts +18 -0
- package/module/Async/throttleAsync.js +41 -0
- package/module/Async/throttleAsync.js.map +1 -0
- package/module/Async/waitFor.d.ts +18 -0
- package/module/Async/waitFor.js +32 -0
- package/module/Async/waitFor.js.map +1 -0
- package/module/Date/addDuration.d.ts +15 -0
- package/module/Date/addDuration.js +40 -0
- package/module/Date/addDuration.js.map +1 -0
- package/module/Date/diff.d.ts +14 -0
- package/module/Date/diff.js +45 -0
- package/module/Date/diff.js.map +1 -0
- package/module/Date/durationUnit.d.ts +12 -0
- package/module/Date/durationUnit.js +2 -0
- package/module/Date/durationUnit.js.map +1 -0
- package/module/Date/endOf.d.ts +13 -0
- package/module/Date/endOf.js +58 -0
- package/module/Date/endOf.js.map +1 -0
- package/module/Date/formatRelative.d.ts +13 -0
- package/module/Date/formatRelative.js +35 -0
- package/module/Date/formatRelative.js.map +1 -0
- package/module/Date/index.d.ts +10 -0
- package/module/Date/index.js +10 -0
- package/module/Date/index.js.map +1 -1
- package/module/Date/isBusinessDay.d.ts +10 -0
- package/module/Date/isBusinessDay.js +18 -0
- package/module/Date/isBusinessDay.js.map +1 -0
- package/module/Date/isSameDay.d.ts +10 -0
- package/module/Date/isSameDay.js +13 -0
- package/module/Date/isSameDay.js.map +1 -0
- package/module/Date/isWeekend.d.ts +9 -0
- package/module/Date/isWeekend.js +13 -0
- package/module/Date/isWeekend.js.map +1 -0
- package/module/Date/msByUnit.d.ts +2 -0
- package/module/Date/msByUnit.js +10 -0
- package/module/Date/msByUnit.js.map +1 -0
- package/module/Date/startOf.d.ts +13 -0
- package/module/Date/startOf.js +58 -0
- package/module/Date/startOf.js.map +1 -0
- package/module/Date/subDuration.d.ts +13 -0
- package/module/Date/subDuration.js +14 -0
- package/module/Date/subDuration.js.map +1 -0
- package/module/Error/index.d.ts +0 -1
- package/module/Error/index.js +0 -1
- package/module/Error/index.js.map +1 -1
- package/module/Object/deepClone.js.map +1 -1
- package/module/Object/flattenObject.d.ts +11 -0
- package/module/Object/flattenObject.js +29 -0
- package/module/Object/flattenObject.js.map +1 -0
- package/module/Object/get.d.ts +1 -0
- package/module/Object/get.js +26 -0
- package/module/Object/get.js.map +1 -0
- package/module/Object/has.d.ts +0 -19
- package/module/Object/has.js +4 -3
- package/module/Object/has.js.map +1 -1
- package/module/Object/index.d.ts +8 -0
- package/module/Object/index.js +8 -0
- package/module/Object/index.js.map +1 -1
- package/module/Object/invert.d.ts +12 -0
- package/module/Object/invert.js +20 -0
- package/module/Object/invert.js.map +1 -0
- package/module/Object/mergeDeep.js.map +1 -1
- package/module/Object/omitBy.d.ts +11 -0
- package/module/Object/omitBy.js +21 -0
- package/module/Object/omitBy.js.map +1 -0
- package/module/Object/pathSegments.d.ts +1 -0
- package/module/Object/pathSegments.js +2 -0
- package/module/Object/pathSegments.js.map +1 -0
- package/module/Object/pick.d.ts +10 -0
- package/module/Object/pick.js +10 -0
- package/module/Object/pick.js.map +1 -1
- package/module/Object/pickBy.d.ts +11 -0
- package/module/Object/pickBy.js +21 -0
- package/module/Object/pickBy.js.map +1 -0
- package/module/Object/set.d.ts +19 -0
- package/module/Object/set.js +38 -0
- package/module/Object/set.js.map +1 -0
- package/module/Object/unflattenObject.d.ts +15 -0
- package/module/Object/unflattenObject.js +23 -0
- package/module/Object/unflattenObject.js.map +1 -0
- package/module/Random/index.d.ts +7 -0
- package/module/Random/index.js +8 -0
- package/module/Random/index.js.map +1 -0
- package/module/Random/randomBoolean.d.ts +9 -0
- package/module/Random/randomBoolean.js +10 -0
- package/module/Random/randomBoolean.js.map +1 -0
- package/module/Random/randomChoice.d.ts +9 -0
- package/module/Random/randomChoice.js +13 -0
- package/module/Random/randomChoice.js.map +1 -0
- package/module/Random/randomFloat.d.ts +9 -0
- package/module/Random/randomFloat.js +10 -0
- package/module/Random/randomFloat.js.map +1 -0
- package/module/Random/randomInt.d.ts +9 -0
- package/module/Random/randomInt.js +14 -0
- package/module/Random/randomInt.js.map +1 -0
- package/module/Random/randomUuid.d.ts +9 -0
- package/module/Random/randomUuid.js +31 -0
- package/module/Random/randomUuid.js.map +1 -0
- package/module/Random/seededRandom.d.ts +11 -0
- package/module/Random/seededRandom.js +31 -0
- package/module/Random/seededRandom.js.map +1 -0
- package/module/Random/weightedChoice.d.ts +15 -0
- package/module/Random/weightedChoice.js +34 -0
- package/module/Random/weightedChoice.js.map +1 -0
- package/module/String/capitalize.d.ts +12 -0
- package/module/String/capitalize.js +18 -0
- package/module/String/capitalize.js.map +1 -0
- package/module/String/capitalizeWord.d.ts +1 -0
- package/module/String/capitalizeWord.js +2 -0
- package/module/String/capitalizeWord.js.map +1 -0
- package/module/String/dedent.d.ts +19 -0
- package/module/String/dedent.js +56 -0
- package/module/String/dedent.js.map +1 -0
- package/module/String/index.d.ts +10 -0
- package/module/String/index.js +10 -0
- package/module/String/index.js.map +1 -1
- package/module/String/mask.d.ts +20 -0
- package/module/String/mask.js +24 -0
- package/module/String/mask.js.map +1 -0
- package/module/String/pascalCase.d.ts +9 -0
- package/module/String/pascalCase.js +14 -0
- package/module/String/pascalCase.js.map +1 -0
- package/module/String/snakeCase.d.ts +9 -0
- package/module/String/snakeCase.js +13 -0
- package/module/String/snakeCase.js.map +1 -0
- package/module/String/titleCase.d.ts +9 -0
- package/module/String/titleCase.js +14 -0
- package/module/String/titleCase.js.map +1 -0
- package/module/String/uncapitalize.d.ts +10 -0
- package/module/String/uncapitalize.js +16 -0
- package/module/String/uncapitalize.js.map +1 -0
- package/module/String/wordCount.d.ts +10 -0
- package/module/String/wordCount.js +12 -0
- package/module/String/wordCount.js.map +1 -0
- package/module/String/words.d.ts +12 -0
- package/module/String/words.js +21 -0
- package/module/String/words.js.map +1 -0
- package/module/Tool/createPipeline.d.ts +1 -1
- package/module/Tool/createPipeline.js +8 -6
- package/module/Tool/createPipeline.js.map +1 -1
- package/module/Tool/pipe.js.map +1 -1
- package/module/URL/buildUrl.d.ts +10 -0
- package/module/URL/buildUrl.js +10 -4
- package/module/URL/buildUrl.js.map +1 -1
- package/module/URL/parseQueryString.d.ts +6 -0
- package/module/URL/parseQueryString.js +6 -4
- package/module/URL/parseQueryString.js.map +1 -1
- package/module/Validate/isNumber.js.map +1 -1
- package/module/Validate/object/core.js +0 -1
- package/module/Validate/object/core.js.map +1 -1
- package/module/es5/Async/debounceAsync.d.ts +18 -0
- package/module/es5/Async/debounceAsync.js +103 -0
- package/module/es5/Async/index.d.ts +5 -0
- package/module/es5/Async/index.js +55 -0
- package/module/es5/Async/pSettled.d.ts +19 -0
- package/module/es5/Async/pSettled.js +68 -0
- package/module/es5/Async/retry.d.ts +22 -0
- package/module/es5/Async/retry.js +106 -0
- package/module/es5/Async/throttleAsync.d.ts +18 -0
- package/module/es5/Async/throttleAsync.js +46 -0
- package/module/es5/Async/waitFor.d.ts +18 -0
- package/module/es5/{Error/retry.js → Async/waitFor.js} +68 -74
- package/module/es5/Date/addDuration.d.ts +15 -0
- package/module/es5/Date/addDuration.js +45 -0
- package/module/es5/Date/diff.d.ts +14 -0
- package/module/es5/Date/diff.js +40 -0
- package/module/es5/Date/durationUnit.d.ts +12 -0
- package/module/es5/Date/durationUnit.js +5 -0
- package/module/es5/Date/endOf.d.ts +13 -0
- package/module/es5/Date/endOf.js +72 -0
- package/module/es5/Date/formatRelative.d.ts +13 -0
- package/module/es5/Date/formatRelative.js +61 -0
- package/module/es5/Date/index.d.ts +10 -0
- package/module/es5/Date/index.js +110 -0
- package/module/es5/Date/isBusinessDay.d.ts +10 -0
- package/module/es5/Date/isBusinessDay.js +26 -0
- package/module/es5/Date/isSameDay.d.ts +10 -0
- package/module/es5/Date/isSameDay.js +18 -0
- package/module/es5/Date/isWeekend.d.ts +9 -0
- package/module/es5/Date/isWeekend.js +18 -0
- package/module/es5/Date/msByUnit.d.ts +2 -0
- package/module/es5/Date/msByUnit.js +15 -0
- package/module/es5/Date/startOf.d.ts +13 -0
- package/module/es5/Date/startOf.js +72 -0
- package/module/es5/Date/subDuration.d.ts +13 -0
- package/module/es5/Date/subDuration.js +21 -0
- package/module/es5/Error/index.d.ts +0 -1
- package/module/es5/Error/index.js +0 -11
- package/module/es5/Object/flattenObject.d.ts +11 -0
- package/module/es5/Object/flattenObject.js +35 -0
- package/module/es5/Object/get.d.ts +1 -0
- package/module/es5/Object/get.js +42 -0
- package/module/es5/Object/has.d.ts +0 -19
- package/module/es5/Object/has.js +5 -11
- package/module/es5/Object/index.d.ts +8 -0
- package/module/es5/Object/index.js +88 -0
- package/module/es5/Object/invert.d.ts +12 -0
- package/module/es5/Object/invert.js +26 -0
- package/module/es5/Object/omitBy.d.ts +11 -0
- package/module/es5/Object/omitBy.js +27 -0
- package/module/es5/Object/pathSegments.d.ts +1 -0
- package/module/es5/Object/pathSegments.js +9 -0
- package/module/es5/Object/pick.d.ts +10 -0
- package/module/es5/Object/pick.js +10 -0
- package/module/es5/Object/pickBy.d.ts +11 -0
- package/module/es5/Object/pickBy.js +27 -0
- package/module/es5/Object/set.d.ts +19 -0
- package/module/es5/Object/set.js +44 -0
- package/module/es5/Object/unflattenObject.d.ts +15 -0
- package/module/es5/Object/unflattenObject.js +30 -0
- package/module/es5/Random/index.d.ts +7 -0
- package/module/es5/Random/index.js +82 -0
- package/module/es5/Random/randomBoolean.d.ts +9 -0
- package/module/es5/Random/randomBoolean.js +18 -0
- package/module/es5/Random/randomChoice.d.ts +9 -0
- package/module/es5/Random/randomChoice.js +18 -0
- package/module/es5/Random/randomFloat.d.ts +9 -0
- package/module/es5/Random/randomFloat.js +17 -0
- package/module/es5/Random/randomInt.d.ts +9 -0
- package/module/es5/Random/randomInt.js +19 -0
- package/module/es5/Random/randomUuid.d.ts +9 -0
- package/module/es5/Random/randomUuid.js +38 -0
- package/module/es5/Random/seededRandom.d.ts +11 -0
- package/module/es5/Random/seededRandom.js +46 -0
- package/module/es5/Random/weightedChoice.d.ts +15 -0
- package/module/es5/Random/weightedChoice.js +50 -0
- package/module/es5/String/capitalize.d.ts +12 -0
- package/module/es5/String/capitalize.js +35 -0
- package/module/es5/String/capitalizeWord.d.ts +1 -0
- package/module/es5/String/capitalizeWord.js +9 -0
- package/module/es5/String/dedent.d.ts +19 -0
- package/module/es5/String/dedent.js +82 -0
- package/module/es5/String/index.d.ts +10 -0
- package/module/es5/String/index.js +110 -0
- package/module/es5/String/mask.d.ts +20 -0
- package/module/es5/String/mask.js +39 -0
- package/module/es5/String/pascalCase.d.ts +9 -0
- package/module/es5/String/pascalCase.js +21 -0
- package/module/es5/String/snakeCase.d.ts +9 -0
- package/module/es5/String/snakeCase.js +20 -0
- package/module/es5/String/titleCase.d.ts +9 -0
- package/module/es5/String/titleCase.js +21 -0
- package/module/es5/String/uncapitalize.d.ts +10 -0
- package/module/es5/String/uncapitalize.js +33 -0
- package/module/es5/String/wordCount.d.ts +10 -0
- package/module/es5/String/wordCount.js +19 -0
- package/module/es5/String/words.d.ts +12 -0
- package/module/es5/String/words.js +25 -0
- package/module/es5/Tool/createPipeline.d.ts +1 -1
- package/module/es5/Tool/createPipeline.js +7 -10
- package/module/es5/URL/buildUrl.d.ts +10 -0
- package/module/es5/URL/buildUrl.js +10 -4
- package/module/es5/URL/parseQueryString.d.ts +6 -0
- package/module/es5/URL/parseQueryString.js +6 -4
- package/module/es5/Validate/object/core.js +0 -1
- package/module/es5/index.d.ts +1 -0
- package/module/es5/index.js +20 -9
- package/module/index.d.ts +1 -0
- package/module/index.js +1 -0
- package/module/index.js.map +1 -1
- package/package.json +34 -29
- package/module/Error/retry.d.ts +0 -37
- package/module/Error/retry.js +0 -47
- package/module/Error/retry.js.map +0 -1
- package/module/es5/Error/retry.d.ts +0 -37
package/module/es5/index.js
CHANGED
|
@@ -179,7 +179,7 @@ Object.keys(_index14).forEach(function (key) {
|
|
|
179
179
|
}
|
|
180
180
|
});
|
|
181
181
|
});
|
|
182
|
-
var _index15 = require("./
|
|
182
|
+
var _index15 = require("./Random/index");
|
|
183
183
|
Object.keys(_index15).forEach(function (key) {
|
|
184
184
|
if (key === "default" || key === "__esModule") return;
|
|
185
185
|
if (key in exports && exports[key] === _index15[key]) return;
|
|
@@ -190,7 +190,7 @@ Object.keys(_index15).forEach(function (key) {
|
|
|
190
190
|
}
|
|
191
191
|
});
|
|
192
192
|
});
|
|
193
|
-
var _index16 = require("./
|
|
193
|
+
var _index16 = require("./Simple/index");
|
|
194
194
|
Object.keys(_index16).forEach(function (key) {
|
|
195
195
|
if (key === "default" || key === "__esModule") return;
|
|
196
196
|
if (key in exports && exports[key] === _index16[key]) return;
|
|
@@ -201,7 +201,7 @@ Object.keys(_index16).forEach(function (key) {
|
|
|
201
201
|
}
|
|
202
202
|
});
|
|
203
203
|
});
|
|
204
|
-
var _index17 = require("./
|
|
204
|
+
var _index17 = require("./String/index");
|
|
205
205
|
Object.keys(_index17).forEach(function (key) {
|
|
206
206
|
if (key === "default" || key === "__esModule") return;
|
|
207
207
|
if (key in exports && exports[key] === _index17[key]) return;
|
|
@@ -212,7 +212,7 @@ Object.keys(_index17).forEach(function (key) {
|
|
|
212
212
|
}
|
|
213
213
|
});
|
|
214
214
|
});
|
|
215
|
-
var _index18 = require("./
|
|
215
|
+
var _index18 = require("./Time/index");
|
|
216
216
|
Object.keys(_index18).forEach(function (key) {
|
|
217
217
|
if (key === "default" || key === "__esModule") return;
|
|
218
218
|
if (key in exports && exports[key] === _index18[key]) return;
|
|
@@ -223,7 +223,7 @@ Object.keys(_index18).forEach(function (key) {
|
|
|
223
223
|
}
|
|
224
224
|
});
|
|
225
225
|
});
|
|
226
|
-
var _index19 = require("./
|
|
226
|
+
var _index19 = require("./Tool/index");
|
|
227
227
|
Object.keys(_index19).forEach(function (key) {
|
|
228
228
|
if (key === "default" || key === "__esModule") return;
|
|
229
229
|
if (key in exports && exports[key] === _index19[key]) return;
|
|
@@ -234,7 +234,7 @@ Object.keys(_index19).forEach(function (key) {
|
|
|
234
234
|
}
|
|
235
235
|
});
|
|
236
236
|
});
|
|
237
|
-
var _index20 = require("./
|
|
237
|
+
var _index20 = require("./types/index");
|
|
238
238
|
Object.keys(_index20).forEach(function (key) {
|
|
239
239
|
if (key === "default" || key === "__esModule") return;
|
|
240
240
|
if (key in exports && exports[key] === _index20[key]) return;
|
|
@@ -245,7 +245,7 @@ Object.keys(_index20).forEach(function (key) {
|
|
|
245
245
|
}
|
|
246
246
|
});
|
|
247
247
|
});
|
|
248
|
-
var _index21 = require("./
|
|
248
|
+
var _index21 = require("./UA/index");
|
|
249
249
|
Object.keys(_index21).forEach(function (key) {
|
|
250
250
|
if (key === "default" || key === "__esModule") return;
|
|
251
251
|
if (key in exports && exports[key] === _index21[key]) return;
|
|
@@ -256,7 +256,7 @@ Object.keys(_index21).forEach(function (key) {
|
|
|
256
256
|
}
|
|
257
257
|
});
|
|
258
258
|
});
|
|
259
|
-
var _index22 = require("./
|
|
259
|
+
var _index22 = require("./Unit/index");
|
|
260
260
|
Object.keys(_index22).forEach(function (key) {
|
|
261
261
|
if (key === "default" || key === "__esModule") return;
|
|
262
262
|
if (key in exports && exports[key] === _index22[key]) return;
|
|
@@ -267,7 +267,7 @@ Object.keys(_index22).forEach(function (key) {
|
|
|
267
267
|
}
|
|
268
268
|
});
|
|
269
269
|
});
|
|
270
|
-
var _index23 = require("./
|
|
270
|
+
var _index23 = require("./URL/index");
|
|
271
271
|
Object.keys(_index23).forEach(function (key) {
|
|
272
272
|
if (key === "default" || key === "__esModule") return;
|
|
273
273
|
if (key in exports && exports[key] === _index23[key]) return;
|
|
@@ -277,4 +277,15 @@ Object.keys(_index23).forEach(function (key) {
|
|
|
277
277
|
return _index23[key];
|
|
278
278
|
}
|
|
279
279
|
});
|
|
280
|
+
});
|
|
281
|
+
var _index24 = require("./Validate/index");
|
|
282
|
+
Object.keys(_index24).forEach(function (key) {
|
|
283
|
+
if (key === "default" || key === "__esModule") return;
|
|
284
|
+
if (key in exports && exports[key] === _index24[key]) return;
|
|
285
|
+
Object.defineProperty(exports, key, {
|
|
286
|
+
enumerable: true,
|
|
287
|
+
get: function get() {
|
|
288
|
+
return _index24[key];
|
|
289
|
+
}
|
|
290
|
+
});
|
|
280
291
|
});
|
package/module/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export * from "./Math/index";
|
|
|
14
14
|
export * from "./Number/index";
|
|
15
15
|
export * from "./Object/index";
|
|
16
16
|
export * from "./Predicate/index";
|
|
17
|
+
export * from "./Random/index";
|
|
17
18
|
export * from "./Simple/index";
|
|
18
19
|
export * from "./String/index";
|
|
19
20
|
export * from "./Time/index";
|
package/module/index.js
CHANGED
|
@@ -14,6 +14,7 @@ export * from "./Math/index";
|
|
|
14
14
|
export * from "./Number/index";
|
|
15
15
|
export * from "./Object/index";
|
|
16
16
|
export * from "./Predicate/index";
|
|
17
|
+
export * from "./Random/index";
|
|
17
18
|
export * from "./Simple/index";
|
|
18
19
|
export * from "./String/index";
|
|
19
20
|
export * from "./Time/index";
|
package/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
|
package/package.json
CHANGED
|
@@ -9,36 +9,36 @@
|
|
|
9
9
|
"@babel/core": "7.29.0",
|
|
10
10
|
"@babel/preset-env": "7.29.2",
|
|
11
11
|
"@babel/preset-typescript": "7.28.5",
|
|
12
|
-
"@biomejs/biome": "2.4.
|
|
13
|
-
"@codecov/bundle-analyzer": "
|
|
12
|
+
"@biomejs/biome": "2.4.13",
|
|
13
|
+
"@codecov/bundle-analyzer": "2.0.1",
|
|
14
14
|
"@eslint/js": "10.0.1",
|
|
15
|
-
"@swc/core": "1.15.
|
|
15
|
+
"@swc/core": "1.15.32",
|
|
16
16
|
"@swc/jest": "0.2.39",
|
|
17
|
-
"@types/bun": "1.3.
|
|
17
|
+
"@types/bun": "1.3.13",
|
|
18
18
|
"@types/jest": "30.0.0",
|
|
19
19
|
"@types/lodash": "4.17.24",
|
|
20
20
|
"@types/node": "25.6.0",
|
|
21
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
22
|
-
"@typescript-eslint/parser": "8.
|
|
23
|
-
"bun-types": "1.3.
|
|
21
|
+
"@typescript-eslint/eslint-plugin": "8.59.1",
|
|
22
|
+
"@typescript-eslint/parser": "8.59.1",
|
|
23
|
+
"bun-types": "1.3.13",
|
|
24
24
|
"dependency-cruiser": "17.3.10",
|
|
25
|
-
"es-toolkit": "1.
|
|
26
|
-
"eslint": "10.2.
|
|
27
|
-
"eslint-plugin-baseline-js": "0.6.
|
|
25
|
+
"es-toolkit": "1.46.0",
|
|
26
|
+
"eslint": "10.2.1",
|
|
27
|
+
"eslint-plugin-baseline-js": "0.6.2",
|
|
28
28
|
"eslint-plugin-import": "2.32.0",
|
|
29
29
|
"eslint-plugin-unicorn": "64.0.0",
|
|
30
30
|
"fast-sort": "3.4.1",
|
|
31
31
|
"gh-pages": "6.3.0",
|
|
32
32
|
"jest": "30.3.0",
|
|
33
|
-
"jest-junit": "
|
|
33
|
+
"jest-junit": "17.0.0",
|
|
34
34
|
"lodash": "4.18.1",
|
|
35
35
|
"mitata": "1.0.34",
|
|
36
36
|
"ts-jest": "29.4.9",
|
|
37
37
|
"ts-node": "10.9.2",
|
|
38
38
|
"tsc-alias": "1.8.16",
|
|
39
39
|
"typedoc": "0.28.19",
|
|
40
|
-
"typescript": "6.0.
|
|
41
|
-
"typescript-eslint": "8.
|
|
40
|
+
"typescript": "6.0.3",
|
|
41
|
+
"typescript-eslint": "8.59.1"
|
|
42
42
|
},
|
|
43
43
|
"exports": {
|
|
44
44
|
".": {
|
|
@@ -126,6 +126,11 @@
|
|
|
126
126
|
"import": "./module/Predicate/index.js",
|
|
127
127
|
"default": "./module/Predicate/index.js"
|
|
128
128
|
},
|
|
129
|
+
"./Random": {
|
|
130
|
+
"types": "./module/Random/index.d.ts",
|
|
131
|
+
"import": "./module/Random/index.js",
|
|
132
|
+
"default": "./module/Random/index.js"
|
|
133
|
+
},
|
|
129
134
|
"./Simple": {
|
|
130
135
|
"types": "./module/Simple/index.d.ts",
|
|
131
136
|
"import": "./module/Simple/index.js",
|
|
@@ -200,23 +205,23 @@
|
|
|
200
205
|
"url": "git+https://github.com/riya-amemiya/UMT.git"
|
|
201
206
|
},
|
|
202
207
|
"scripts": {
|
|
203
|
-
"build": "
|
|
204
|
-
"build:cjs": "
|
|
205
|
-
"build:babel": "
|
|
206
|
-
"build:cjs:babel": "
|
|
207
|
-
"build:full": "
|
|
208
|
-
"build:clean": "
|
|
209
|
-
"build:clean:full": "
|
|
210
|
-
"deploy": "
|
|
211
|
-
"eslint": "eslint
|
|
212
|
-
"format": "
|
|
213
|
-
"lint": "
|
|
214
|
-
"lint:ci": "
|
|
215
|
-
"test": "
|
|
216
|
-
"test-debug": "
|
|
217
|
-
"ts-node": "
|
|
208
|
+
"build": "nix develop --command make build",
|
|
209
|
+
"build:cjs": "nix develop --command make build-cjs",
|
|
210
|
+
"build:babel": "nix develop --command make build-babel",
|
|
211
|
+
"build:cjs:babel": "nix develop --command make build-cjs-babel",
|
|
212
|
+
"build:full": "nix develop --command make build-full",
|
|
213
|
+
"build:clean": "nix develop --command make build-clean",
|
|
214
|
+
"build:clean:full": "nix develop --command make build-clean-full",
|
|
215
|
+
"deploy": "nix develop --command make deploy",
|
|
216
|
+
"eslint": "nix develop --command make eslint",
|
|
217
|
+
"format": "nix develop --command make format",
|
|
218
|
+
"lint": "nix develop --command make lint",
|
|
219
|
+
"lint:ci": "nix develop --command make lint-ci",
|
|
220
|
+
"test": "nix develop --command make test",
|
|
221
|
+
"test-debug": "nix develop --command make test-debug",
|
|
222
|
+
"ts-node": "nix develop --command make ts-node"
|
|
218
223
|
},
|
|
219
224
|
"type": "module",
|
|
220
225
|
"types": "module/index.d.ts",
|
|
221
|
-
"version": "2.
|
|
226
|
+
"version": "2.17.0"
|
|
222
227
|
}
|
package/module/Error/retry.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export interface RetryOptions {
|
|
2
|
-
retries?: number;
|
|
3
|
-
delay?: number;
|
|
4
|
-
shouldRetry?: (error: unknown) => boolean;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Retries a given async function with configurable retry logic
|
|
8
|
-
*
|
|
9
|
-
* @template T - The return type of the function
|
|
10
|
-
* @param function_ - The async function to retry
|
|
11
|
-
* @param options - Configuration options for retry behavior
|
|
12
|
-
* @param options.retries - Maximum number of retry attempts (default: 3)
|
|
13
|
-
* @param options.delay - Delay between retries in milliseconds (default: 1000)
|
|
14
|
-
* @param options.shouldRetry - Function to determine if an error should trigger a retry (default: always retry)
|
|
15
|
-
* @returns Promise that resolves with the function result or rejects with the final error
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* // Basic usage with default options
|
|
20
|
-
* const result = await retry(async () => {
|
|
21
|
-
* const response = await fetch('/api/data');
|
|
22
|
-
* if (!response.ok) throw new Error('Failed to fetch');
|
|
23
|
-
* return response.json();
|
|
24
|
-
* });
|
|
25
|
-
*
|
|
26
|
-
* // Custom retry configuration
|
|
27
|
-
* const result = await retry(
|
|
28
|
-
* () => riskyOperation(),
|
|
29
|
-
* {
|
|
30
|
-
* retries: 5,
|
|
31
|
-
* delay: 2000,
|
|
32
|
-
* shouldRetry: (error) => error instanceof NetworkError
|
|
33
|
-
* }
|
|
34
|
-
* );
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
export declare const retry: <T>(function_: () => Promise<T>, options?: RetryOptions) => Promise<T>;
|
package/module/Error/retry.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Retries a given async function with configurable retry logic
|
|
3
|
-
*
|
|
4
|
-
* @template T - The return type of the function
|
|
5
|
-
* @param function_ - The async function to retry
|
|
6
|
-
* @param options - Configuration options for retry behavior
|
|
7
|
-
* @param options.retries - Maximum number of retry attempts (default: 3)
|
|
8
|
-
* @param options.delay - Delay between retries in milliseconds (default: 1000)
|
|
9
|
-
* @param options.shouldRetry - Function to determine if an error should trigger a retry (default: always retry)
|
|
10
|
-
* @returns Promise that resolves with the function result or rejects with the final error
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```typescript
|
|
14
|
-
* // Basic usage with default options
|
|
15
|
-
* const result = await retry(async () => {
|
|
16
|
-
* const response = await fetch('/api/data');
|
|
17
|
-
* if (!response.ok) throw new Error('Failed to fetch');
|
|
18
|
-
* return response.json();
|
|
19
|
-
* });
|
|
20
|
-
*
|
|
21
|
-
* // Custom retry configuration
|
|
22
|
-
* const result = await retry(
|
|
23
|
-
* () => riskyOperation(),
|
|
24
|
-
* {
|
|
25
|
-
* retries: 5,
|
|
26
|
-
* delay: 2000,
|
|
27
|
-
* shouldRetry: (error) => error instanceof NetworkError
|
|
28
|
-
* }
|
|
29
|
-
* );
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
export const retry = (function_, options = {}) => {
|
|
33
|
-
const { retries = 3, delay = 1000, shouldRetry = () => true } = options;
|
|
34
|
-
const attempt = async (remainingAttempts) => {
|
|
35
|
-
try {
|
|
36
|
-
return await function_();
|
|
37
|
-
}
|
|
38
|
-
catch (error) {
|
|
39
|
-
if (remainingAttempts <= 0 || !shouldRetry(error)) {
|
|
40
|
-
throw error;
|
|
41
|
-
}
|
|
42
|
-
return await new Promise((resolve) => setTimeout(() => resolve(attempt(remainingAttempts - 1)), delay));
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
return attempt(retries);
|
|
46
|
-
};
|
|
47
|
-
//# sourceMappingURL=retry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"retry.js","sourceRoot":"","sources":["../../src/Error/retry.ts"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CACnB,SAA2B,EAC3B,UAAwB,EAAE,EACd,EAAE;IACd,MAAM,EAAE,OAAO,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,EAAE,WAAW,GAAG,GAAG,EAAE,CAAC,IAAI,EAAE,GAAG,OAAO,CAAC;IACxE,MAAM,OAAO,GAAG,KAAK,EAAE,iBAAyB,EAAc,EAAE;QAC9D,IAAI,CAAC;YACH,OAAO,MAAM,SAAS,EAAE,CAAC;QAC3B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,iBAAiB,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE,CAAC;gBAClD,MAAM,KAAK,CAAC;YACd,CAAC;YACD,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CACnC,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,iBAAiB,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CACjE,CAAC;QACJ,CAAC;IACH,CAAC,CAAC;IACF,OAAO,OAAO,CAAC,OAAO,CAAC,CAAC;AAC1B,CAAC,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export interface RetryOptions {
|
|
2
|
-
retries?: number;
|
|
3
|
-
delay?: number;
|
|
4
|
-
shouldRetry?: (error: unknown) => boolean;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Retries a given async function with configurable retry logic
|
|
8
|
-
*
|
|
9
|
-
* @template T - The return type of the function
|
|
10
|
-
* @param function_ - The async function to retry
|
|
11
|
-
* @param options - Configuration options for retry behavior
|
|
12
|
-
* @param options.retries - Maximum number of retry attempts (default: 3)
|
|
13
|
-
* @param options.delay - Delay between retries in milliseconds (default: 1000)
|
|
14
|
-
* @param options.shouldRetry - Function to determine if an error should trigger a retry (default: always retry)
|
|
15
|
-
* @returns Promise that resolves with the function result or rejects with the final error
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```typescript
|
|
19
|
-
* // Basic usage with default options
|
|
20
|
-
* const result = await retry(async () => {
|
|
21
|
-
* const response = await fetch('/api/data');
|
|
22
|
-
* if (!response.ok) throw new Error('Failed to fetch');
|
|
23
|
-
* return response.json();
|
|
24
|
-
* });
|
|
25
|
-
*
|
|
26
|
-
* // Custom retry configuration
|
|
27
|
-
* const result = await retry(
|
|
28
|
-
* () => riskyOperation(),
|
|
29
|
-
* {
|
|
30
|
-
* retries: 5,
|
|
31
|
-
* delay: 2000,
|
|
32
|
-
* shouldRetry: (error) => error instanceof NetworkError
|
|
33
|
-
* }
|
|
34
|
-
* );
|
|
35
|
-
* ```
|
|
36
|
-
*/
|
|
37
|
-
export declare const retry: <T>(function_: () => Promise<T>, options?: RetryOptions) => Promise<T>;
|