@naturalcycles/js-lib 14.276.0 → 15.0.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/cfg/frontend/tsconfig.json +3 -3
- package/dist/abort.js +1 -4
- package/dist/array/array.util.d.ts +1 -1
- package/dist/array/array.util.js +47 -88
- package/dist/array/range.d.ts +2 -2
- package/dist/array/range.js +7 -12
- package/dist/bot.js +6 -10
- package/dist/browser/adminService.d.ts +1 -1
- package/dist/browser/adminService.js +10 -14
- package/dist/browser/analytics.util.js +10 -15
- package/dist/browser/i18n/fetchTranslationLoader.d.ts +3 -3
- package/dist/browser/i18n/fetchTranslationLoader.js +1 -5
- package/dist/browser/i18n/translation.service.d.ts +1 -1
- package/dist/browser/i18n/translation.service.js +5 -10
- package/dist/browser/imageFitter.js +1 -5
- package/dist/browser/script.util.js +8 -12
- package/dist/browser/topbar.js +7 -10
- package/dist/datetime/dateInterval.d.ts +2 -2
- package/dist/datetime/dateInterval.js +7 -11
- package/dist/datetime/localDate.d.ts +3 -3
- package/dist/datetime/localDate.js +40 -44
- package/dist/datetime/localTime.d.ts +3 -3
- package/dist/datetime/localTime.js +36 -40
- package/dist/datetime/timeInterval.d.ts +2 -2
- package/dist/datetime/timeInterval.js +6 -10
- package/dist/datetime/wallTime.d.ts +3 -3
- package/dist/datetime/wallTime.js +5 -9
- package/dist/decorators/asyncMemo.decorator.d.ts +3 -3
- package/dist/decorators/asyncMemo.decorator.js +12 -17
- package/dist/decorators/createPromiseDecorator.js +3 -6
- package/dist/decorators/debounce.d.ts +1 -1
- package/dist/decorators/debounce.decorator.d.ts +1 -1
- package/dist/decorators/debounce.decorator.js +5 -9
- package/dist/decorators/debounce.js +2 -6
- package/dist/decorators/decorator.util.d.ts +1 -1
- package/dist/decorators/decorator.util.js +3 -8
- package/dist/decorators/logMethod.decorator.d.ts +1 -1
- package/dist/decorators/logMethod.decorator.js +11 -14
- package/dist/decorators/memo.decorator.d.ts +3 -3
- package/dist/decorators/memo.decorator.js +11 -16
- package/dist/decorators/memo.util.d.ts +2 -2
- package/dist/decorators/memo.util.js +11 -17
- package/dist/decorators/memoFn.d.ts +3 -3
- package/dist/decorators/memoFn.js +3 -6
- package/dist/decorators/memoFnAsync.d.ts +3 -3
- package/dist/decorators/memoFnAsync.js +5 -8
- package/dist/decorators/memoSimple.decorator.d.ts +1 -1
- package/dist/decorators/memoSimple.decorator.js +6 -10
- package/dist/decorators/retry.decorator.d.ts +1 -1
- package/dist/decorators/retry.decorator.js +3 -6
- package/dist/decorators/swarmSafe.decorator.js +3 -7
- package/dist/decorators/timeout.decorator.d.ts +1 -1
- package/dist/decorators/timeout.decorator.js +7 -10
- package/dist/define.d.ts +1 -1
- package/dist/define.js +11 -19
- package/dist/deviceIdService.js +7 -11
- package/dist/enum.util.d.ts +1 -1
- package/dist/enum.util.js +20 -42
- package/dist/env/buildInfo.d.ts +1 -1
- package/dist/env/buildInfo.js +3 -6
- package/dist/env.js +2 -6
- package/dist/error/assert.d.ts +3 -3
- package/dist/error/assert.js +30 -44
- package/dist/error/error.model.d.ts +2 -2
- package/dist/error/error.model.js +1 -2
- package/dist/error/error.util.d.ts +1 -1
- package/dist/error/error.util.js +25 -44
- package/dist/error/errorMode.js +2 -5
- package/dist/error/try.d.ts +2 -2
- package/dist/error/try.js +15 -23
- package/dist/error/tryCatch.d.ts +2 -2
- package/dist/error/tryCatch.js +6 -11
- package/dist/form.util.d.ts +1 -1
- package/dist/form.util.js +2 -6
- package/dist/http/fetcher.d.ts +3 -3
- package/dist/http/fetcher.js +48 -53
- package/dist/http/fetcher.model.d.ts +5 -5
- package/dist/http/fetcher.model.js +1 -2
- package/dist/http/http.model.js +1 -4
- package/dist/index.d.ts +96 -96
- package/dist/index.js +96 -99
- package/dist/is.util.d.ts +2 -2
- package/dist/is.util.js +12 -27
- package/dist/iter/asyncIterable2.d.ts +3 -3
- package/dist/iter/asyncIterable2.js +8 -12
- package/dist/iter/iterable2.d.ts +2 -2
- package/dist/iter/iterable2.js +8 -12
- package/dist/json-schema/from-data/generateJsonSchemaFromData.d.ts +1 -1
- package/dist/json-schema/from-data/generateJsonSchemaFromData.js +4 -7
- package/dist/json-schema/jsonSchema.cnst.d.ts +1 -1
- package/dist/json-schema/jsonSchema.cnst.js +1 -4
- package/dist/json-schema/jsonSchema.model.d.ts +1 -1
- package/dist/json-schema/jsonSchema.model.js +1 -2
- package/dist/json-schema/jsonSchema.util.d.ts +2 -2
- package/dist/json-schema/jsonSchema.util.js +5 -8
- package/dist/json-schema/jsonSchemaBuilder.d.ts +2 -2
- package/dist/json-schema/jsonSchemaBuilder.js +16 -25
- package/dist/json-schema/jsonSchemas.d.ts +2 -2
- package/dist/json-schema/jsonSchemas.js +5 -8
- package/dist/log/commonLogger.js +14 -21
- package/dist/math/accumulatingAverage.js +1 -5
- package/dist/math/math.util.js +11 -19
- package/dist/math/sma.js +1 -5
- package/dist/math/stack.util.js +11 -16
- package/dist/nanoid.js +2 -6
- package/dist/number/createDeterministicRandom.js +1 -4
- package/dist/number/number.util.d.ts +1 -1
- package/dist/number/number.util.js +9 -20
- package/dist/object/deepEquals.js +3 -8
- package/dist/object/map2.js +1 -5
- package/dist/object/object.util.d.ts +2 -2
- package/dist/object/object.util.js +40 -70
- package/dist/object/set2.js +1 -5
- package/dist/object/sortObject.d.ts +1 -1
- package/dist/object/sortObject.js +1 -4
- package/dist/object/sortObjectDeep.js +1 -4
- package/dist/polyfill.js +1 -4
- package/dist/promise/abortable.d.ts +1 -1
- package/dist/promise/abortable.js +2 -7
- package/dist/promise/pDefer.js +1 -4
- package/dist/promise/pDelay.d.ts +2 -2
- package/dist/promise/pDelay.js +4 -8
- package/dist/promise/pFilter.d.ts +1 -1
- package/dist/promise/pFilter.js +1 -4
- package/dist/promise/pHang.js +1 -4
- package/dist/promise/pMap.d.ts +2 -2
- package/dist/promise/pMap.js +17 -20
- package/dist/promise/pProps.js +1 -4
- package/dist/promise/pQueue.d.ts +2 -2
- package/dist/promise/pQueue.js +7 -11
- package/dist/promise/pRetry.d.ts +1 -1
- package/dist/promise/pRetry.js +8 -12
- package/dist/promise/pState.js +1 -4
- package/dist/promise/pTimeout.d.ts +3 -3
- package/dist/promise/pTimeout.js +7 -11
- package/dist/semver.d.ts +1 -1
- package/dist/semver.js +13 -18
- package/dist/string/case.js +9 -14
- package/dist/string/escape.js +2 -6
- package/dist/string/hash.util.d.ts +1 -1
- package/dist/string/hash.util.js +4 -10
- package/dist/string/json.util.d.ts +1 -1
- package/dist/string/json.util.js +5 -10
- package/dist/string/leven.js +1 -4
- package/dist/string/lodash/unicodeWords.js +1 -4
- package/dist/string/lodash/words.js +3 -6
- package/dist/string/pupa.d.ts +1 -1
- package/dist/string/pupa.js +4 -9
- package/dist/string/readingTime.d.ts +1 -1
- package/dist/string/readingTime.js +1 -4
- package/dist/string/regex.js +1 -4
- package/dist/string/safeJsonStringify.d.ts +1 -1
- package/dist/string/safeJsonStringify.js +1 -4
- package/dist/string/slugify.js +1 -4
- package/dist/string/string.util.js +15 -32
- package/dist/string/stringify.d.ts +1 -1
- package/dist/string/stringify.js +10 -14
- package/dist/string/url.util.d.ts +1 -1
- package/dist/string/url.util.js +2 -6
- package/dist/time/time.util.d.ts +1 -1
- package/dist/time/time.util.js +3 -8
- package/dist/typeFest.js +1 -2
- package/dist/types.d.ts +7 -3
- package/dist/types.js +21 -23
- package/dist/unit/size.util.js +5 -12
- package/dist/web.d.ts +1 -1
- package/dist/web.js +1 -5
- package/dist/zod/index.d.ts +2 -2
- package/dist/zod/index.js +4 -10
- package/dist/zod/zod.shared.schemas.js +36 -39
- package/dist/zod/zod.util.js +7 -14
- package/package.json +7 -8
- package/src/array/array.util.ts +3 -3
- package/src/array/range.ts +2 -2
- package/src/bot.ts +1 -1
- package/src/browser/adminService.ts +4 -4
- package/src/browser/analytics.util.ts +1 -1
- package/src/browser/i18n/fetchTranslationLoader.ts +3 -3
- package/src/browser/i18n/translation.service.ts +2 -2
- package/src/browser/script.util.ts +2 -2
- package/src/datetime/dateInterval.ts +3 -3
- package/src/datetime/localDate.ts +5 -5
- package/src/datetime/localTime.ts +6 -6
- package/src/datetime/timeInterval.ts +3 -3
- package/src/datetime/wallTime.ts +4 -4
- package/src/decorators/asyncMemo.decorator.ts +7 -7
- package/src/decorators/createPromiseDecorator.ts +1 -1
- package/src/decorators/debounce.decorator.ts +2 -2
- package/src/decorators/debounce.ts +1 -1
- package/src/decorators/decorator.util.ts +1 -1
- package/src/decorators/logMethod.decorator.ts +4 -4
- package/src/decorators/memo.decorator.ts +7 -7
- package/src/decorators/memo.util.ts +4 -4
- package/src/decorators/memoFn.ts +4 -4
- package/src/decorators/memoFnAsync.ts +5 -5
- package/src/decorators/memoSimple.decorator.ts +4 -4
- package/src/decorators/retry.decorator.ts +2 -2
- package/src/decorators/swarmSafe.decorator.ts +2 -2
- package/src/decorators/timeout.decorator.ts +4 -4
- package/src/define.ts +3 -3
- package/src/deviceIdService.ts +3 -3
- package/src/enum.util.ts +1 -1
- package/src/env/buildInfo.ts +2 -2
- package/src/error/assert.ts +7 -7
- package/src/error/error.model.ts +2 -2
- package/src/error/error.util.ts +5 -5
- package/src/error/try.ts +5 -5
- package/src/error/tryCatch.ts +3 -3
- package/src/form.util.ts +1 -1
- package/src/http/fetcher.model.ts +5 -5
- package/src/http/fetcher.ts +20 -15
- package/src/index.ts +96 -96
- package/src/is.util.ts +2 -2
- package/src/iter/asyncIterable2.ts +3 -3
- package/src/iter/iterable2.ts +2 -2
- package/src/json-schema/from-data/generateJsonSchemaFromData.ts +2 -2
- package/src/json-schema/jsonSchema.cnst.ts +1 -1
- package/src/json-schema/jsonSchema.model.ts +1 -1
- package/src/json-schema/jsonSchema.util.ts +4 -4
- package/src/json-schema/jsonSchemaBuilder.ts +5 -5
- package/src/json-schema/jsonSchemas.ts +2 -2
- package/src/math/math.util.ts +2 -2
- package/src/math/stack.util.ts +1 -1
- package/src/number/number.util.ts +1 -1
- package/src/object/object.util.ts +3 -3
- package/src/object/sortObject.ts +1 -1
- package/src/promise/abortable.ts +1 -1
- package/src/promise/pDelay.ts +3 -3
- package/src/promise/pFilter.ts +1 -1
- package/src/promise/pMap.ts +2 -2
- package/src/promise/pQueue.ts +4 -4
- package/src/promise/pRetry.ts +2 -2
- package/src/promise/pTimeout.ts +4 -4
- package/src/semver.ts +3 -3
- package/src/string/case.ts +2 -2
- package/src/string/hash.util.ts +1 -1
- package/src/string/json.util.ts +2 -2
- package/src/string/lodash/words.ts +1 -1
- package/src/string/pupa.ts +2 -2
- package/src/string/readingTime.ts +1 -1
- package/src/string/safeJsonStringify.ts +1 -1
- package/src/string/stringify.ts +4 -4
- package/src/string/url.util.ts +1 -1
- package/src/time/time.util.ts +1 -1
- package/src/types.ts +15 -3
- package/src/web.ts +1 -1
- package/src/zod/index.ts +2 -2
- package/src/zod/zod.util.ts +1 -1
- package/dist-esm/abort.js +0 -12
- package/dist-esm/array/array.util.js +0 -458
- package/dist-esm/array/range.js +0 -34
- package/dist-esm/bot.js +0 -130
- package/dist-esm/browser/adminService.js +0 -94
- package/dist-esm/browser/analytics.util.js +0 -54
- package/dist-esm/browser/i18n/fetchTranslationLoader.js +0 -13
- package/dist-esm/browser/i18n/translation.service.js +0 -56
- package/dist-esm/browser/imageFitter.js +0 -65
- package/dist-esm/browser/script.util.js +0 -46
- package/dist-esm/browser/topbar.js +0 -135
- package/dist-esm/datetime/dateInterval.js +0 -80
- package/dist-esm/datetime/localDate.js +0 -719
- package/dist-esm/datetime/localTime.js +0 -996
- package/dist-esm/datetime/timeInterval.js +0 -88
- package/dist-esm/datetime/wallTime.js +0 -70
- package/dist-esm/decorators/asyncMemo.decorator.js +0 -111
- package/dist-esm/decorators/createPromiseDecorator.js +0 -82
- package/dist-esm/decorators/debounce.decorator.js +0 -17
- package/dist-esm/decorators/debounce.js +0 -114
- package/dist-esm/decorators/decorator.util.js +0 -31
- package/dist-esm/decorators/logMethod.decorator.js +0 -85
- package/dist-esm/decorators/memo.decorator.js +0 -80
- package/dist-esm/decorators/memo.util.js +0 -97
- package/dist-esm/decorators/memoFn.js +0 -29
- package/dist-esm/decorators/memoFnAsync.js +0 -35
- package/dist-esm/decorators/memoSimple.decorator.js +0 -55
- package/dist-esm/decorators/retry.decorator.js +0 -9
- package/dist-esm/decorators/swarmSafe.decorator.js +0 -38
- package/dist-esm/decorators/timeout.decorator.js +0 -19
- package/dist-esm/define.js +0 -109
- package/dist-esm/deviceIdService.js +0 -105
- package/dist-esm/enum.util.js +0 -157
- package/dist-esm/env/buildInfo.js +0 -19
- package/dist-esm/env.js +0 -19
- package/dist-esm/error/assert.js +0 -122
- package/dist-esm/error/error.model.js +0 -1
- package/dist-esm/error/error.util.js +0 -337
- package/dist-esm/error/errorMode.js +0 -20
- package/dist-esm/error/try.js +0 -105
- package/dist-esm/error/tryCatch.js +0 -41
- package/dist-esm/form.util.js +0 -16
- package/dist-esm/http/fetcher.js +0 -704
- package/dist-esm/http/fetcher.model.js +0 -3
- package/dist-esm/http/http.model.js +0 -1
- package/dist-esm/index.js +0 -96
- package/dist-esm/is.util.js +0 -70
- package/dist-esm/iter/asyncIterable2.js +0 -103
- package/dist-esm/iter/iterable2.js +0 -87
- package/dist-esm/json-schema/from-data/generateJsonSchemaFromData.js +0 -86
- package/dist-esm/json-schema/jsonSchema.cnst.js +0 -38
- package/dist-esm/json-schema/jsonSchema.model.js +0 -1
- package/dist-esm/json-schema/jsonSchema.util.js +0 -27
- package/dist-esm/json-schema/jsonSchemaBuilder.js +0 -352
- package/dist-esm/json-schema/jsonSchemas.js +0 -6
- package/dist-esm/log/commonLogger.js +0 -78
- package/dist-esm/math/accumulatingAverage.js +0 -32
- package/dist-esm/math/math.util.js +0 -85
- package/dist-esm/math/sma.js +0 -43
- package/dist-esm/math/stack.util.js +0 -82
- package/dist-esm/nanoid.js +0 -57
- package/dist-esm/number/createDeterministicRandom.js +0 -18
- package/dist-esm/number/number.util.js +0 -109
- package/dist-esm/object/deepEquals.js +0 -170
- package/dist-esm/object/map2.js +0 -21
- package/dist-esm/object/object.util.js +0 -435
- package/dist-esm/object/set2.js +0 -15
- package/dist-esm/object/sortObject.js +0 -21
- package/dist-esm/object/sortObjectDeep.js +0 -17
- package/dist-esm/polyfill.js +0 -6
- package/dist-esm/promise/abortable.js +0 -31
- package/dist-esm/promise/pDefer.js +0 -17
- package/dist-esm/promise/pDelay.js +0 -37
- package/dist-esm/promise/pFilter.js +0 -5
- package/dist-esm/promise/pHang.js +0 -6
- package/dist-esm/promise/pMap.js +0 -174
- package/dist-esm/promise/pProps.js +0 -20
- package/dist-esm/promise/pQueue.js +0 -101
- package/dist-esm/promise/pRetry.js +0 -64
- package/dist-esm/promise/pState.js +0 -14
- package/dist-esm/promise/pTimeout.js +0 -64
- package/dist-esm/semver.js +0 -149
- package/dist-esm/string/case.js +0 -24
- package/dist-esm/string/escape.js +0 -49
- package/dist-esm/string/hash.util.js +0 -67
- package/dist-esm/string/json.util.js +0 -46
- package/dist-esm/string/leven.js +0 -77
- package/dist-esm/string/lodash/unicodeWords.js +0 -68
- package/dist-esm/string/lodash/words.js +0 -31
- package/dist-esm/string/pupa.js +0 -54
- package/dist-esm/string/readingTime.js +0 -102
- package/dist-esm/string/regex.js +0 -6
- package/dist-esm/string/safeJsonStringify.js +0 -39
- package/dist-esm/string/slugify.js +0 -66
- package/dist-esm/string/string.util.js +0 -99
- package/dist-esm/string/stringify.js +0 -133
- package/dist-esm/string/url.util.js +0 -42
- package/dist-esm/time/time.util.js +0 -61
- package/dist-esm/typeFest.js +0 -2
- package/dist-esm/types.js +0 -59
- package/dist-esm/unit/size.util.js +0 -43
- package/dist-esm/web.js +0 -40
- package/dist-esm/zod/index.js +0 -4
- package/dist-esm/zod/zod.shared.schemas.js +0 -92
- package/dist-esm/zod/zod.util.js +0 -52
package/dist/index.d.ts
CHANGED
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
export * from './abort';
|
|
2
|
-
export * from './array/array.util';
|
|
3
|
-
export * from './array/range';
|
|
4
|
-
export * from './bot';
|
|
5
|
-
export * from './browser/adminService';
|
|
6
|
-
export * from './browser/analytics.util';
|
|
7
|
-
export * from './browser/i18n/fetchTranslationLoader';
|
|
8
|
-
export * from './browser/i18n/translation.service';
|
|
9
|
-
export * from './browser/imageFitter';
|
|
10
|
-
export * from './browser/script.util';
|
|
11
|
-
export * from './browser/topbar';
|
|
12
|
-
export * from './datetime/dateInterval';
|
|
13
|
-
export * from './datetime/localDate';
|
|
14
|
-
export * from './datetime/localTime';
|
|
15
|
-
export * from './datetime/timeInterval';
|
|
16
|
-
export * from './datetime/wallTime';
|
|
17
|
-
export * from './decorators/asyncMemo.decorator';
|
|
18
|
-
export * from './decorators/createPromiseDecorator';
|
|
19
|
-
export * from './decorators/debounce';
|
|
20
|
-
export * from './decorators/debounce.
|
|
21
|
-
export * from './decorators/decorator.util';
|
|
22
|
-
export * from './decorators/logMethod.decorator';
|
|
23
|
-
export * from './decorators/memo.decorator';
|
|
24
|
-
export * from './decorators/memo.util';
|
|
25
|
-
export * from './decorators/memoFn';
|
|
26
|
-
export * from './decorators/memoFnAsync';
|
|
27
|
-
export * from './decorators/retry.decorator';
|
|
28
|
-
export * from './decorators/timeout.decorator';
|
|
29
|
-
export * from './define';
|
|
30
|
-
export * from './deviceIdService';
|
|
31
|
-
export * from './enum.util';
|
|
32
|
-
export * from './env';
|
|
33
|
-
export * from './env/buildInfo';
|
|
34
|
-
export * from './error/assert';
|
|
35
|
-
export * from './error/error.model';
|
|
36
|
-
export * from './error/error.util';
|
|
37
|
-
export * from './error/errorMode';
|
|
38
|
-
export * from './error/try';
|
|
39
|
-
export * from './error/tryCatch';
|
|
40
|
-
export * from './form.util';
|
|
41
|
-
export * from './http/fetcher';
|
|
42
|
-
export * from './http/fetcher.model';
|
|
43
|
-
export * from './http/http.model';
|
|
44
|
-
export * from './is.util';
|
|
45
|
-
export * from './iter/asyncIterable2';
|
|
46
|
-
export * from './iter/iterable2';
|
|
47
|
-
export * from './json-schema/from-data/generateJsonSchemaFromData';
|
|
48
|
-
export * from './json-schema/jsonSchema.cnst';
|
|
49
|
-
export * from './json-schema/jsonSchema.model';
|
|
50
|
-
export * from './json-schema/jsonSchema.util';
|
|
51
|
-
export * from './json-schema/jsonSchemaBuilder';
|
|
52
|
-
export * from './log/commonLogger';
|
|
53
|
-
export * from './math/accumulatingAverage';
|
|
54
|
-
export * from './math/math.util';
|
|
55
|
-
export * from './math/sma';
|
|
56
|
-
export * from './math/stack.util';
|
|
57
|
-
export * from './nanoid';
|
|
58
|
-
export * from './number/createDeterministicRandom';
|
|
59
|
-
export * from './number/number.util';
|
|
60
|
-
export * from './object/deepEquals';
|
|
61
|
-
export * from './object/map2';
|
|
62
|
-
export * from './object/object.util';
|
|
63
|
-
export * from './object/set2';
|
|
64
|
-
export * from './object/sortObject';
|
|
65
|
-
export * from './object/sortObjectDeep';
|
|
66
|
-
export * from './polyfill';
|
|
67
|
-
export * from './promise/abortable';
|
|
68
|
-
export * from './promise/pDefer';
|
|
69
|
-
export * from './promise/pDelay';
|
|
70
|
-
export * from './promise/pFilter';
|
|
71
|
-
export * from './promise/pHang';
|
|
72
|
-
export * from './promise/pMap';
|
|
73
|
-
export * from './promise/pProps';
|
|
74
|
-
export * from './promise/pQueue';
|
|
75
|
-
export * from './promise/pRetry';
|
|
76
|
-
export * from './promise/pState';
|
|
77
|
-
export * from './promise/pTimeout';
|
|
78
|
-
export * from './semver';
|
|
79
|
-
export * from './string/case';
|
|
80
|
-
export * from './string/escape';
|
|
81
|
-
export * from './string/hash.util';
|
|
82
|
-
export * from './string/json.util';
|
|
83
|
-
export * from './string/leven';
|
|
84
|
-
export * from './string/pupa';
|
|
85
|
-
export * from './string/readingTime';
|
|
86
|
-
export * from './string/regex';
|
|
87
|
-
export * from './string/safeJsonStringify';
|
|
88
|
-
export * from './string/slugify';
|
|
89
|
-
export * from './string/string.util';
|
|
90
|
-
export * from './string/stringify';
|
|
91
|
-
export * from './string/url.util';
|
|
92
|
-
export * from './time/time.util';
|
|
93
|
-
export * from './typeFest';
|
|
94
|
-
export * from './types';
|
|
95
|
-
export * from './unit/size.util';
|
|
96
|
-
export * from './web';
|
|
1
|
+
export * from './abort.js';
|
|
2
|
+
export * from './array/array.util.js';
|
|
3
|
+
export * from './array/range.js';
|
|
4
|
+
export * from './bot.js';
|
|
5
|
+
export * from './browser/adminService.js';
|
|
6
|
+
export * from './browser/analytics.util.js';
|
|
7
|
+
export * from './browser/i18n/fetchTranslationLoader.js';
|
|
8
|
+
export * from './browser/i18n/translation.service.js';
|
|
9
|
+
export * from './browser/imageFitter.js';
|
|
10
|
+
export * from './browser/script.util.js';
|
|
11
|
+
export * from './browser/topbar.js';
|
|
12
|
+
export * from './datetime/dateInterval.js';
|
|
13
|
+
export * from './datetime/localDate.js';
|
|
14
|
+
export * from './datetime/localTime.js';
|
|
15
|
+
export * from './datetime/timeInterval.js';
|
|
16
|
+
export * from './datetime/wallTime.js';
|
|
17
|
+
export * from './decorators/asyncMemo.decorator.js';
|
|
18
|
+
export * from './decorators/createPromiseDecorator.js';
|
|
19
|
+
export * from './decorators/debounce.decorator.js';
|
|
20
|
+
export * from './decorators/debounce.js';
|
|
21
|
+
export * from './decorators/decorator.util.js';
|
|
22
|
+
export * from './decorators/logMethod.decorator.js';
|
|
23
|
+
export * from './decorators/memo.decorator.js';
|
|
24
|
+
export * from './decorators/memo.util.js';
|
|
25
|
+
export * from './decorators/memoFn.js';
|
|
26
|
+
export * from './decorators/memoFnAsync.js';
|
|
27
|
+
export * from './decorators/retry.decorator.js';
|
|
28
|
+
export * from './decorators/timeout.decorator.js';
|
|
29
|
+
export * from './define.js';
|
|
30
|
+
export * from './deviceIdService.js';
|
|
31
|
+
export * from './enum.util.js';
|
|
32
|
+
export * from './env.js';
|
|
33
|
+
export * from './env/buildInfo.js';
|
|
34
|
+
export * from './error/assert.js';
|
|
35
|
+
export * from './error/error.model.js';
|
|
36
|
+
export * from './error/error.util.js';
|
|
37
|
+
export * from './error/errorMode.js';
|
|
38
|
+
export * from './error/try.js';
|
|
39
|
+
export * from './error/tryCatch.js';
|
|
40
|
+
export * from './form.util.js';
|
|
41
|
+
export * from './http/fetcher.js';
|
|
42
|
+
export * from './http/fetcher.model.js';
|
|
43
|
+
export * from './http/http.model.js';
|
|
44
|
+
export * from './is.util.js';
|
|
45
|
+
export * from './iter/asyncIterable2.js';
|
|
46
|
+
export * from './iter/iterable2.js';
|
|
47
|
+
export * from './json-schema/from-data/generateJsonSchemaFromData.js';
|
|
48
|
+
export * from './json-schema/jsonSchema.cnst.js';
|
|
49
|
+
export * from './json-schema/jsonSchema.model.js';
|
|
50
|
+
export * from './json-schema/jsonSchema.util.js';
|
|
51
|
+
export * from './json-schema/jsonSchemaBuilder.js';
|
|
52
|
+
export * from './log/commonLogger.js';
|
|
53
|
+
export * from './math/accumulatingAverage.js';
|
|
54
|
+
export * from './math/math.util.js';
|
|
55
|
+
export * from './math/sma.js';
|
|
56
|
+
export * from './math/stack.util.js';
|
|
57
|
+
export * from './nanoid.js';
|
|
58
|
+
export * from './number/createDeterministicRandom.js';
|
|
59
|
+
export * from './number/number.util.js';
|
|
60
|
+
export * from './object/deepEquals.js';
|
|
61
|
+
export * from './object/map2.js';
|
|
62
|
+
export * from './object/object.util.js';
|
|
63
|
+
export * from './object/set2.js';
|
|
64
|
+
export * from './object/sortObject.js';
|
|
65
|
+
export * from './object/sortObjectDeep.js';
|
|
66
|
+
export * from './polyfill.js';
|
|
67
|
+
export * from './promise/abortable.js';
|
|
68
|
+
export * from './promise/pDefer.js';
|
|
69
|
+
export * from './promise/pDelay.js';
|
|
70
|
+
export * from './promise/pFilter.js';
|
|
71
|
+
export * from './promise/pHang.js';
|
|
72
|
+
export * from './promise/pMap.js';
|
|
73
|
+
export * from './promise/pProps.js';
|
|
74
|
+
export * from './promise/pQueue.js';
|
|
75
|
+
export * from './promise/pRetry.js';
|
|
76
|
+
export * from './promise/pState.js';
|
|
77
|
+
export * from './promise/pTimeout.js';
|
|
78
|
+
export * from './semver.js';
|
|
79
|
+
export * from './string/case.js';
|
|
80
|
+
export * from './string/escape.js';
|
|
81
|
+
export * from './string/hash.util.js';
|
|
82
|
+
export * from './string/json.util.js';
|
|
83
|
+
export * from './string/leven.js';
|
|
84
|
+
export * from './string/pupa.js';
|
|
85
|
+
export * from './string/readingTime.js';
|
|
86
|
+
export * from './string/regex.js';
|
|
87
|
+
export * from './string/safeJsonStringify.js';
|
|
88
|
+
export * from './string/slugify.js';
|
|
89
|
+
export * from './string/string.util.js';
|
|
90
|
+
export * from './string/stringify.js';
|
|
91
|
+
export * from './string/url.util.js';
|
|
92
|
+
export * from './time/time.util.js';
|
|
93
|
+
export * from './typeFest.js';
|
|
94
|
+
export * from './types.js';
|
|
95
|
+
export * from './unit/size.util.js';
|
|
96
|
+
export * from './web.js';
|
package/dist/index.js
CHANGED
|
@@ -1,99 +1,96 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
tslib_1.__exportStar(require("./types"), exports);
|
|
98
|
-
tslib_1.__exportStar(require("./unit/size.util"), exports);
|
|
99
|
-
tslib_1.__exportStar(require("./web"), exports);
|
|
1
|
+
export * from './abort.js';
|
|
2
|
+
export * from './array/array.util.js';
|
|
3
|
+
export * from './array/range.js';
|
|
4
|
+
export * from './bot.js';
|
|
5
|
+
export * from './browser/adminService.js';
|
|
6
|
+
export * from './browser/analytics.util.js';
|
|
7
|
+
export * from './browser/i18n/fetchTranslationLoader.js';
|
|
8
|
+
export * from './browser/i18n/translation.service.js';
|
|
9
|
+
export * from './browser/imageFitter.js';
|
|
10
|
+
export * from './browser/script.util.js';
|
|
11
|
+
export * from './browser/topbar.js';
|
|
12
|
+
export * from './datetime/dateInterval.js';
|
|
13
|
+
export * from './datetime/localDate.js';
|
|
14
|
+
export * from './datetime/localTime.js';
|
|
15
|
+
export * from './datetime/timeInterval.js';
|
|
16
|
+
export * from './datetime/wallTime.js';
|
|
17
|
+
export * from './decorators/asyncMemo.decorator.js';
|
|
18
|
+
export * from './decorators/createPromiseDecorator.js';
|
|
19
|
+
export * from './decorators/debounce.decorator.js';
|
|
20
|
+
export * from './decorators/debounce.js';
|
|
21
|
+
export * from './decorators/decorator.util.js';
|
|
22
|
+
export * from './decorators/logMethod.decorator.js';
|
|
23
|
+
export * from './decorators/memo.decorator.js';
|
|
24
|
+
export * from './decorators/memo.util.js';
|
|
25
|
+
export * from './decorators/memoFn.js';
|
|
26
|
+
export * from './decorators/memoFnAsync.js';
|
|
27
|
+
export * from './decorators/retry.decorator.js';
|
|
28
|
+
export * from './decorators/timeout.decorator.js';
|
|
29
|
+
export * from './define.js';
|
|
30
|
+
export * from './deviceIdService.js';
|
|
31
|
+
export * from './enum.util.js';
|
|
32
|
+
export * from './env.js';
|
|
33
|
+
export * from './env/buildInfo.js';
|
|
34
|
+
export * from './error/assert.js';
|
|
35
|
+
export * from './error/error.model.js';
|
|
36
|
+
export * from './error/error.util.js';
|
|
37
|
+
export * from './error/errorMode.js';
|
|
38
|
+
export * from './error/try.js';
|
|
39
|
+
export * from './error/tryCatch.js';
|
|
40
|
+
export * from './form.util.js';
|
|
41
|
+
export * from './http/fetcher.js';
|
|
42
|
+
export * from './http/fetcher.model.js';
|
|
43
|
+
export * from './http/http.model.js';
|
|
44
|
+
export * from './is.util.js';
|
|
45
|
+
export * from './iter/asyncIterable2.js';
|
|
46
|
+
export * from './iter/iterable2.js';
|
|
47
|
+
export * from './json-schema/from-data/generateJsonSchemaFromData.js';
|
|
48
|
+
export * from './json-schema/jsonSchema.cnst.js';
|
|
49
|
+
export * from './json-schema/jsonSchema.model.js';
|
|
50
|
+
export * from './json-schema/jsonSchema.util.js';
|
|
51
|
+
export * from './json-schema/jsonSchemaBuilder.js';
|
|
52
|
+
export * from './log/commonLogger.js';
|
|
53
|
+
export * from './math/accumulatingAverage.js';
|
|
54
|
+
export * from './math/math.util.js';
|
|
55
|
+
export * from './math/sma.js';
|
|
56
|
+
export * from './math/stack.util.js';
|
|
57
|
+
export * from './nanoid.js';
|
|
58
|
+
export * from './number/createDeterministicRandom.js';
|
|
59
|
+
export * from './number/number.util.js';
|
|
60
|
+
export * from './object/deepEquals.js';
|
|
61
|
+
export * from './object/map2.js';
|
|
62
|
+
export * from './object/object.util.js';
|
|
63
|
+
export * from './object/set2.js';
|
|
64
|
+
export * from './object/sortObject.js';
|
|
65
|
+
export * from './object/sortObjectDeep.js';
|
|
66
|
+
export * from './polyfill.js';
|
|
67
|
+
export * from './promise/abortable.js';
|
|
68
|
+
export * from './promise/pDefer.js';
|
|
69
|
+
export * from './promise/pDelay.js';
|
|
70
|
+
export * from './promise/pFilter.js';
|
|
71
|
+
export * from './promise/pHang.js';
|
|
72
|
+
export * from './promise/pMap.js';
|
|
73
|
+
export * from './promise/pProps.js';
|
|
74
|
+
export * from './promise/pQueue.js';
|
|
75
|
+
export * from './promise/pRetry.js';
|
|
76
|
+
export * from './promise/pState.js';
|
|
77
|
+
export * from './promise/pTimeout.js';
|
|
78
|
+
export * from './semver.js';
|
|
79
|
+
export * from './string/case.js';
|
|
80
|
+
export * from './string/escape.js';
|
|
81
|
+
export * from './string/hash.util.js';
|
|
82
|
+
export * from './string/json.util.js';
|
|
83
|
+
export * from './string/leven.js';
|
|
84
|
+
export * from './string/pupa.js';
|
|
85
|
+
export * from './string/readingTime.js';
|
|
86
|
+
export * from './string/regex.js';
|
|
87
|
+
export * from './string/safeJsonStringify.js';
|
|
88
|
+
export * from './string/slugify.js';
|
|
89
|
+
export * from './string/string.util.js';
|
|
90
|
+
export * from './string/stringify.js';
|
|
91
|
+
export * from './string/url.util.js';
|
|
92
|
+
export * from './time/time.util.js';
|
|
93
|
+
export * from './typeFest.js';
|
|
94
|
+
export * from './types.js';
|
|
95
|
+
export * from './unit/size.util.js';
|
|
96
|
+
export * from './web.js';
|
package/dist/is.util.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Primitive } from './typeFest';
|
|
2
|
-
import type { AnyObject, FalsyValue, NullishValue } from './types';
|
|
1
|
+
import type { Primitive } from './typeFest.js';
|
|
2
|
+
import type { AnyObject, FalsyValue, NullishValue } from './types.js';
|
|
3
3
|
type Nullish<T> = T extends NullishValue ? T : never;
|
|
4
4
|
type Truthy<T> = T extends FalsyValue ? never : T;
|
|
5
5
|
type Falsy<T> = T extends FalsyValue ? T : never;
|
package/dist/is.util.js
CHANGED
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
exports._isPrimitive = _isPrimitive;
|
|
6
|
-
exports._isEmptyObject = _isEmptyObject;
|
|
7
|
-
exports._isNotEmptyObject = _isNotEmptyObject;
|
|
8
|
-
exports._isEmpty = _isEmpty;
|
|
9
|
-
exports._isNotEmpty = _isNotEmpty;
|
|
10
|
-
const _isNull = (v) => v === null;
|
|
11
|
-
exports._isNull = _isNull;
|
|
12
|
-
const _isUndefined = (v) => v === undefined;
|
|
13
|
-
exports._isUndefined = _isUndefined;
|
|
14
|
-
const _isNullish = (v) => v === undefined || v === null;
|
|
15
|
-
exports._isNullish = _isNullish;
|
|
16
|
-
const _isNotNullish = (v) => v !== undefined && v !== null;
|
|
17
|
-
exports._isNotNullish = _isNotNullish;
|
|
1
|
+
export const _isNull = (v) => v === null;
|
|
2
|
+
export const _isUndefined = (v) => v === undefined;
|
|
3
|
+
export const _isNullish = (v) => v === undefined || v === null;
|
|
4
|
+
export const _isNotNullish = (v) => v !== undefined && v !== null;
|
|
18
5
|
/**
|
|
19
6
|
* Same as Boolean, but with correct type output.
|
|
20
7
|
* Related:
|
|
@@ -26,19 +13,17 @@ exports._isNotNullish = _isNotNullish;
|
|
|
26
13
|
* [1, 2, undefined].filter(_isTruthy)
|
|
27
14
|
* // => [1, 2]
|
|
28
15
|
*/
|
|
29
|
-
const _isTruthy = (v) => !!v;
|
|
30
|
-
|
|
31
|
-
const _isFalsy = (v) => !v;
|
|
32
|
-
exports._isFalsy = _isFalsy;
|
|
16
|
+
export const _isTruthy = (v) => !!v;
|
|
17
|
+
export const _isFalsy = (v) => !v;
|
|
33
18
|
/**
|
|
34
19
|
* Returns true if item is Object, not null and not Array.
|
|
35
20
|
*
|
|
36
21
|
* Currently treats RegEx as Object too, e.g _isObject(/some/) === true
|
|
37
22
|
*/
|
|
38
|
-
function _isObject(obj) {
|
|
23
|
+
export function _isObject(obj) {
|
|
39
24
|
return (typeof obj === 'object' && obj !== null && !Array.isArray(obj)) || false;
|
|
40
25
|
}
|
|
41
|
-
function _isPrimitive(v) {
|
|
26
|
+
export function _isPrimitive(v) {
|
|
42
27
|
return (v === null ||
|
|
43
28
|
v === undefined ||
|
|
44
29
|
typeof v === 'number' ||
|
|
@@ -47,10 +32,10 @@ function _isPrimitive(v) {
|
|
|
47
32
|
typeof v === 'bigint' ||
|
|
48
33
|
typeof v === 'symbol');
|
|
49
34
|
}
|
|
50
|
-
function _isEmptyObject(obj) {
|
|
35
|
+
export function _isEmptyObject(obj) {
|
|
51
36
|
return Object.keys(obj).length === 0;
|
|
52
37
|
}
|
|
53
|
-
function _isNotEmptyObject(obj) {
|
|
38
|
+
export function _isNotEmptyObject(obj) {
|
|
54
39
|
return Object.keys(obj).length > 0;
|
|
55
40
|
}
|
|
56
41
|
/**
|
|
@@ -63,7 +48,7 @@ function _isNotEmptyObject(obj) {
|
|
|
63
48
|
* new Map() (empty Map)
|
|
64
49
|
* new Set() (empty Set)
|
|
65
50
|
*/
|
|
66
|
-
function _isEmpty(obj) {
|
|
51
|
+
export function _isEmpty(obj) {
|
|
67
52
|
if (obj === undefined || obj === null)
|
|
68
53
|
return true;
|
|
69
54
|
if (typeof obj === 'string' || Array.isArray(obj)) {
|
|
@@ -80,6 +65,6 @@ function _isEmpty(obj) {
|
|
|
80
65
|
/**
|
|
81
66
|
* @see _isEmpty
|
|
82
67
|
*/
|
|
83
|
-
function _isNotEmpty(obj) {
|
|
68
|
+
export function _isNotEmpty(obj) {
|
|
84
69
|
return !_isEmpty(obj);
|
|
85
70
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Promisable } from '../typeFest';
|
|
2
|
-
import type { AbortableAsyncMapper, AbortableAsyncPredicate } from '../types';
|
|
3
|
-
import { END } from '../types';
|
|
1
|
+
import type { Promisable } from '../typeFest.js';
|
|
2
|
+
import type { AbortableAsyncMapper, AbortableAsyncPredicate } from '../types.js';
|
|
3
|
+
import { END } from '../types.js';
|
|
4
4
|
/**
|
|
5
5
|
* Similar to Iterable2, but for AsyncIterable.
|
|
6
6
|
*
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AsyncIterable2 = void 0;
|
|
4
|
-
const types_1 = require("../types");
|
|
1
|
+
import { END, SKIP } from '../types.js';
|
|
5
2
|
/**
|
|
6
3
|
* Similar to Iterable2, but for AsyncIterable.
|
|
7
4
|
*
|
|
@@ -12,7 +9,7 @@ const types_1 = require("../types");
|
|
|
12
9
|
*
|
|
13
10
|
* @experimental
|
|
14
11
|
*/
|
|
15
|
-
class AsyncIterable2 {
|
|
12
|
+
export class AsyncIterable2 {
|
|
16
13
|
it;
|
|
17
14
|
constructor(it) {
|
|
18
15
|
this.it = it;
|
|
@@ -47,7 +44,7 @@ class AsyncIterable2 {
|
|
|
47
44
|
async forEach(cb) {
|
|
48
45
|
let i = 0;
|
|
49
46
|
for await (const v of this.it) {
|
|
50
|
-
if ((await cb(v, i++)) ===
|
|
47
|
+
if ((await cb(v, i++)) === END)
|
|
51
48
|
return;
|
|
52
49
|
}
|
|
53
50
|
}
|
|
@@ -58,7 +55,7 @@ class AsyncIterable2 {
|
|
|
58
55
|
let i = 0;
|
|
59
56
|
for await (const v of this.it) {
|
|
60
57
|
const r = await cb(v, i++);
|
|
61
|
-
if (r ===
|
|
58
|
+
if (r === END || !r)
|
|
62
59
|
return false;
|
|
63
60
|
}
|
|
64
61
|
return true;
|
|
@@ -67,7 +64,7 @@ class AsyncIterable2 {
|
|
|
67
64
|
let i = 0;
|
|
68
65
|
for await (const v of this.it) {
|
|
69
66
|
const r = await cb(v, i++);
|
|
70
|
-
if (r ===
|
|
67
|
+
if (r === END)
|
|
71
68
|
return;
|
|
72
69
|
if (r)
|
|
73
70
|
return v;
|
|
@@ -80,7 +77,7 @@ class AsyncIterable2 {
|
|
|
80
77
|
let i = 0;
|
|
81
78
|
for await (const v of it) {
|
|
82
79
|
const r = await cb(v, i++);
|
|
83
|
-
if (r ===
|
|
80
|
+
if (r === END)
|
|
84
81
|
return;
|
|
85
82
|
if (r)
|
|
86
83
|
yield v;
|
|
@@ -95,9 +92,9 @@ class AsyncIterable2 {
|
|
|
95
92
|
let i = 0;
|
|
96
93
|
for await (const v of it) {
|
|
97
94
|
const r = await mapper(v, i++);
|
|
98
|
-
if (r ===
|
|
95
|
+
if (r === END)
|
|
99
96
|
return;
|
|
100
|
-
if (r ===
|
|
97
|
+
if (r === SKIP)
|
|
101
98
|
continue;
|
|
102
99
|
yield r;
|
|
103
100
|
}
|
|
@@ -105,4 +102,3 @@ class AsyncIterable2 {
|
|
|
105
102
|
});
|
|
106
103
|
}
|
|
107
104
|
}
|
|
108
|
-
exports.AsyncIterable2 = AsyncIterable2;
|
package/dist/iter/iterable2.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AbortableMapper, AbortablePredicate } from '../types';
|
|
2
|
-
import { END } from '../types';
|
|
1
|
+
import type { AbortableMapper, AbortablePredicate } from '../types.js';
|
|
2
|
+
import { END } from '../types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Iterable2 is a wrapper around Iterable that implements "Iterator Helpers proposal":
|
|
5
5
|
* https://github.com/tc39/proposal-iterator-helpers
|