@koine/utils 1.1.10 → 1.1.11
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/Defer.js +6 -2
- package/{node/Defer.js → Defer.mjs} +2 -6
- package/Emitter.js +6 -2
- package/{node/Emitter.js → Emitter.mjs} +2 -6
- package/accentSets.js +5 -2
- package/{node/accentSets.js → accentSets.mjs} +2 -5
- package/addOrReplaceAtIdx.js +8 -4
- package/addOrReplaceAtIdx.mjs +19 -0
- package/areEqual.js +10 -6
- package/{node/areEqual.js → areEqual.mjs} +6 -10
- package/arrayOfAll.js +6 -2
- package/{node/arrayOfAll.js → arrayOfAll.mjs} +2 -6
- package/arraySum.js +6 -2
- package/arraySum.mjs +9 -0
- package/arrayToLookup.js +6 -2
- package/{node/arrayToLookup.js → arrayToLookup.mjs} +2 -6
- package/buildUrlQueryString.js +12 -7
- package/{node/buildUrlQueryString.js → buildUrlQueryString.mjs} +7 -12
- package/capitalize.js +6 -2
- package/{node/capitalize.js → capitalize.mjs} +2 -6
- package/changeUrlPath.js +11 -6
- package/changeUrlPath.mjs +18 -0
- package/chunkByChunks.js +6 -2
- package/{node/chunkByChunks.js → chunkByChunks.mjs} +2 -6
- package/chunkBySize.js +6 -2
- package/{node/chunkBySize.js → chunkBySize.mjs} +2 -6
- package/clamp.js +6 -2
- package/{node/clamp.js → clamp.mjs} +2 -6
- package/clsx.js +6 -2
- package/{node/clsx.js → clsx.mjs} +2 -6
- package/convertRange.js +6 -2
- package/{node/convertRange.js → convertRange.mjs} +2 -6
- package/cookie.js +4 -1
- package/{node/cookie.js → cookie.mjs} +1 -4
- package/debounce.js +6 -2
- package/{node/debounce.js → debounce.mjs} +2 -6
- package/debouncePromise.js +6 -3
- package/debouncePromise.mjs +9 -0
- package/debounceRaf.js +6 -2
- package/{node/debounceRaf.js → debounceRaf.mjs} +2 -6
- package/decode.js +6 -2
- package/{node/decode.js → decode.mjs} +2 -6
- package/encode.js +6 -2
- package/{node/encode.js → encode.mjs} +2 -6
- package/ensureInt.js +6 -2
- package/ensureInt.mjs +9 -0
- package/{node/env.js → env.mjs} +0 -0
- package/findDuplicatedIndexes.js +6 -2
- package/{node/findDuplicatedIndexes.js → findDuplicatedIndexes.mjs} +2 -6
- package/forin.js +6 -2
- package/forin.mjs +11 -0
- package/gbToBytes.js +6 -2
- package/gbToBytes.mjs +7 -0
- package/getEmptyArray.js +9 -4
- package/getEmptyArray.mjs +15 -0
- package/getKeys.js +5 -2
- package/{node/getKeys.js → getKeys.mjs} +2 -5
- package/getMediaQueryWidthResolvers.js +8 -4
- package/{node/getMediaQueryWidthResolvers.js → getMediaQueryWidthResolvers.mjs} +4 -8
- package/getMediaQueryWidthTailwindScreens.js +8 -4
- package/{node/getMediaQueryWidthTailwindScreens.js → getMediaQueryWidthTailwindScreens.mjs} +4 -8
- package/getNonce.js +8 -4
- package/getNonce.mjs +9 -0
- package/getParamAmong.js +9 -4
- package/{node/getParamAmong.js → getParamAmong.mjs} +4 -9
- package/getParamAsInt.js +9 -4
- package/{node/getParamAsInt.js → getParamAsInt.mjs} +4 -9
- package/getParamAsString.js +9 -4
- package/getParamAsString.mjs +14 -0
- package/getType.js +6 -2
- package/{node/getType.js → getType.mjs} +2 -6
- package/getUrlHashParams.js +6 -2
- package/{node/getUrlHashParams.js → getUrlHashParams.mjs} +2 -6
- package/getUrlHashPathname.js +6 -2
- package/{node/getUrlHashPathname.js → getUrlHashPathname.mjs} +2 -6
- package/getUrlPathnameParts.js +9 -4
- package/{node/getUrlPathnameParts.js → getUrlPathnameParts.mjs} +4 -9
- package/getUrlQueryParams.js +9 -4
- package/{node/getUrlQueryParams.js → getUrlQueryParams.mjs} +4 -9
- package/imgEmptyPixel.js +5 -2
- package/imgEmptyPixel.mjs +7 -0
- package/index.js +132 -129
- package/index.mjs +131 -0
- package/invariant.js +6 -2
- package/{node/invariant.js → invariant.mjs} +2 -6
- package/isAnyObject.js +9 -4
- package/isAnyObject.mjs +10 -0
- package/isArray.js +9 -4
- package/isArray.mjs +10 -0
- package/isBlob.js +9 -4
- package/isBlob.mjs +10 -0
- package/isBoolean.js +9 -4
- package/isBoolean.mjs +10 -0
- package/isBrowser.js +5 -2
- package/isBrowser.mjs +8 -0
- package/isDate.js +9 -4
- package/isDate.mjs +10 -0
- package/isEmptyArray.js +9 -4
- package/isEmptyArray.mjs +10 -0
- package/isEmptyObject.js +9 -4
- package/isEmptyObject.mjs +10 -0
- package/isEmptyString.js +6 -2
- package/isEmptyString.mjs +9 -0
- package/isError.js +9 -4
- package/isError.mjs +10 -0
- package/isExternalUrl.js +9 -4
- package/{node/isExternalUrl.js → isExternalUrl.mjs} +4 -9
- package/isFile.js +9 -4
- package/isFile.mjs +10 -0
- package/isFloat.js +9 -4
- package/isFloat.mjs +10 -0
- package/isFormData.js +9 -4
- package/isFormData.mjs +10 -0
- package/isFullArray.js +9 -4
- package/isFullArray.mjs +10 -0
- package/isFullObject.js +9 -4
- package/isFullObject.mjs +10 -0
- package/isFullString.js +9 -4
- package/isFullString.mjs +10 -0
- package/isFunction.js +6 -2
- package/isFunction.mjs +9 -0
- package/isInt.js +9 -4
- package/isInt.mjs +10 -0
- package/isMap.js +9 -4
- package/isMap.mjs +10 -0
- package/isNaNValue.js +9 -4
- package/isNaNValue.mjs +10 -0
- package/isNegativeNumber.js +9 -4
- package/isNegativeNumber.mjs +10 -0
- package/isNull.js +9 -4
- package/isNull.mjs +10 -0
- package/isNullOrUndefined.js +9 -5
- package/isNullOrUndefined.mjs +10 -0
- package/isNumber.js +9 -4
- package/isNumber.mjs +12 -0
- package/isObject.js +9 -4
- package/isObject.mjs +10 -0
- package/isObjectLike.js +9 -4
- package/isObjectLike.mjs +12 -0
- package/isOneOf.js +6 -2
- package/isOneOf.mjs +10 -0
- package/isPlainObject.js +9 -4
- package/isPlainObject.mjs +13 -0
- package/isPositiveNumber.js +9 -4
- package/isPositiveNumber.mjs +10 -0
- package/isPrimitive.js +19 -14
- package/isPrimitive.mjs +20 -0
- package/isPromise.js +9 -4
- package/isPromise.mjs +10 -0
- package/isRegExp.js +9 -4
- package/isRegExp.mjs +10 -0
- package/isServer.js +7 -3
- package/isServer.mjs +9 -0
- package/isSet.js +9 -4
- package/isSet.mjs +10 -0
- package/isString.js +9 -4
- package/isString.mjs +10 -0
- package/isSymbol.js +9 -4
- package/isSymbol.mjs +10 -0
- package/isType.js +9 -4
- package/{node/isType.js → isType.mjs} +4 -9
- package/isUndefined.js +9 -4
- package/isUndefined.mjs +10 -0
- package/isWeakMap.js +9 -4
- package/isWeakMap.mjs +10 -0
- package/isWeakSet.js +9 -4
- package/isWeakSet.mjs +10 -0
- package/kbToBytes.js +6 -2
- package/kbToBytes.mjs +7 -0
- package/location.js +2 -1
- package/location.mjs +1 -0
- package/lowercase.js +6 -2
- package/lowercase.mjs +9 -0
- package/mapListBy.js +6 -2
- package/{node/mapListBy.js → mapListBy.mjs} +2 -6
- package/matchSorter.js +11 -7
- package/{node/matchSorter.js → matchSorter.mjs} +7 -11
- package/mbToBytes.js +6 -2
- package/mbToBytes.mjs +7 -0
- package/mergeObjects.js +11 -7
- package/{node/mergeObjects.js → mergeObjects.mjs} +7 -11
- package/mergeUrlQueryParams.js +9 -4
- package/{node/mergeUrlQueryParams.js → mergeUrlQueryParams.mjs} +4 -9
- package/moveSortableArrayItemByKey.js +8 -4
- package/{node/moveSortableArrayItemByKey.js → moveSortableArrayItemByKey.mjs} +4 -8
- package/noop.js +6 -2
- package/noop.mjs +7 -0
- package/normaliseUrl.js +9 -4
- package/normaliseUrl.mjs +15 -0
- package/normaliseUrlPathname.js +9 -4
- package/normaliseUrlPathname.mjs +14 -0
- package/objectOmit.js +6 -2
- package/{node/objectOmit.js → objectOmit.mjs} +2 -6
- package/objectPick.js +6 -2
- package/{node/objectPick.js → objectPick.mjs} +2 -6
- package/package.json +4 -3
- package/parseCookie.js +6 -2
- package/{node/parseCookie.js → parseCookie.mjs} +2 -6
- package/parseURL.js +6 -2
- package/{node/parseURL.js → parseURL.mjs} +2 -6
- package/quaranteneProps.js +6 -2
- package/{node/quaranteneProps.js → quaranteneProps.mjs} +2 -6
- package/randomInt.js +6 -2
- package/randomInt.mjs +9 -0
- package/randomKey.js +6 -2
- package/{node/randomKey.js → randomKey.mjs} +2 -6
- package/readCookie.js +6 -2
- package/{node/readCookie.js → readCookie.mjs} +2 -6
- package/removeAccents.js +8 -4
- package/removeAccents.mjs +15 -0
- package/removeCookie.js +10 -6
- package/removeCookie.mjs +15 -0
- package/{node/removeDuplicates.js → removeDuplicates.mjs} +0 -0
- package/removeDuplicatesByKey.js +6 -2
- package/{node/removeDuplicatesByKey.js → removeDuplicatesByKey.mjs} +2 -6
- package/removeDuplicatesComparing.js +10 -6
- package/removeDuplicatesComparing.mjs +10 -0
- package/removeIndexesFromArray.js +6 -2
- package/removeIndexesFromArray.mjs +14 -0
- package/removeTrailingSlash.js +6 -2
- package/removeTrailingSlash.mjs +10 -0
- package/removeUrlQueryParams.js +11 -6
- package/removeUrlQueryParams.mjs +21 -0
- package/roundTo.js +6 -2
- package/{node/roundTo.js → roundTo.mjs} +2 -6
- package/serializeCookie.js +8 -4
- package/{node/serializeCookie.js → serializeCookie.mjs} +4 -8
- package/setCookie.js +14 -10
- package/{node/setCookie.js → setCookie.mjs} +10 -14
- package/shuffle.js +8 -4
- package/{node/shuffle.js → shuffle.mjs} +4 -8
- package/slugify.js +9 -5
- package/{node/slugify.js → slugify.mjs} +5 -9
- package/swapMap.js +6 -2
- package/{node/swapMap.js → swapMap.mjs} +2 -6
- package/throttle.js +8 -4
- package/{node/throttle.js → throttle.mjs} +4 -8
- package/titleCase.js +6 -2
- package/{node/titleCase.js → titleCase.mjs} +2 -6
- package/toNumber.js +8 -4
- package/toNumber.mjs +8 -0
- package/toRgba.js +6 -2
- package/{node/toRgba.js → toRgba.mjs} +2 -6
- package/transformToUrlPathname.js +9 -4
- package/transformToUrlPathname.mjs +16 -0
- package/truncate.js +6 -2
- package/truncate.mjs +13 -0
- package/tryUntil.js +6 -2
- package/{node/tryUntil.js → tryUntil.mjs} +2 -6
- package/types.js +2 -1
- package/types.mjs +1 -0
- package/uid.js +6 -2
- package/{node/uid.js → uid.mjs} +2 -6
- package/updateLinkParams.js +9 -4
- package/updateLinkParams.mjs +14 -0
- package/updateUrlQueryParams.js +12 -7
- package/updateUrlQueryParams.mjs +18 -0
- package/uppercase.js +6 -2
- package/uppercase.mjs +9 -0
- package/uuid.js +6 -2
- package/{node/uuid.js → uuid.mjs} +2 -6
- package/uuidNumeric.js +6 -2
- package/uuidNumeric.mjs +6 -0
- package/wait.js +6 -2
- package/wait.mjs +9 -0
- package/node/addOrReplaceAtIdx.js +0 -23
- package/node/arraySum.js +0 -13
- package/node/changeUrlPath.js +0 -23
- package/node/debouncePromise.js +0 -12
- package/node/ensureInt.js +0 -13
- package/node/forin.js +0 -15
- package/node/gbToBytes.js +0 -11
- package/node/getEmptyArray.js +0 -20
- package/node/getNonce.js +0 -13
- package/node/getParamAsString.js +0 -19
- package/node/imgEmptyPixel.js +0 -10
- package/node/index.js +0 -134
- package/node/isAnyObject.js +0 -15
- package/node/isArray.js +0 -15
- package/node/isBlob.js +0 -15
- package/node/isBoolean.js +0 -15
- package/node/isBrowser.js +0 -11
- package/node/isDate.js +0 -15
- package/node/isEmptyArray.js +0 -15
- package/node/isEmptyObject.js +0 -15
- package/node/isEmptyString.js +0 -13
- package/node/isError.js +0 -15
- package/node/isFile.js +0 -15
- package/node/isFloat.js +0 -15
- package/node/isFormData.js +0 -15
- package/node/isFullArray.js +0 -15
- package/node/isFullObject.js +0 -15
- package/node/isFullString.js +0 -15
- package/node/isFunction.js +0 -13
- package/node/isInt.js +0 -15
- package/node/isMap.js +0 -15
- package/node/isNaNValue.js +0 -15
- package/node/isNegativeNumber.js +0 -15
- package/node/isNull.js +0 -15
- package/node/isNullOrUndefined.js +0 -14
- package/node/isNumber.js +0 -17
- package/node/isObject.js +0 -15
- package/node/isObjectLike.js +0 -17
- package/node/isOneOf.js +0 -14
- package/node/isPlainObject.js +0 -18
- package/node/isPositiveNumber.js +0 -15
- package/node/isPrimitive.js +0 -25
- package/node/isPromise.js +0 -15
- package/node/isRegExp.js +0 -15
- package/node/isServer.js +0 -13
- package/node/isSet.js +0 -15
- package/node/isString.js +0 -15
- package/node/isSymbol.js +0 -15
- package/node/isUndefined.js +0 -15
- package/node/isWeakMap.js +0 -15
- package/node/isWeakSet.js +0 -15
- package/node/kbToBytes.js +0 -11
- package/node/location.js +0 -2
- package/node/lowercase.js +0 -13
- package/node/mbToBytes.js +0 -11
- package/node/noop.js +0 -11
- package/node/normaliseUrl.js +0 -20
- package/node/normaliseUrlPathname.js +0 -19
- package/node/randomInt.js +0 -13
- package/node/removeAccents.js +0 -19
- package/node/removeCookie.js +0 -19
- package/node/removeDuplicatesComparing.js +0 -14
- package/node/removeIndexesFromArray.js +0 -18
- package/node/removeTrailingSlash.js +0 -14
- package/node/removeUrlQueryParams.js +0 -26
- package/node/toNumber.js +0 -12
- package/node/transformToUrlPathname.js +0 -21
- package/node/truncate.js +0 -17
- package/node/types.js +0 -2
- package/node/updateLinkParams.js +0 -19
- package/node/updateUrlQueryParams.js +0 -23
- package/node/uppercase.js +0 -13
- package/node/uuidNumeric.js +0 -10
- package/node/wait.js +0 -13
package/index.js
CHANGED
|
@@ -1,131 +1,134 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./accentSets"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./addOrReplaceAtIdx"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./areEqual"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./arrayOfAll"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./arraySum"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./arrayToLookup"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./buildUrlQueryString"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./capitalize"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./changeUrlPath"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./chunkByChunks"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./chunkBySize"), exports);
|
|
15
|
+
tslib_1.__exportStar(require("./clamp"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./clsx"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./convertRange"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./cookie"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./debounce"), exports);
|
|
20
|
+
tslib_1.__exportStar(require("./debounceRaf"), exports);
|
|
21
|
+
tslib_1.__exportStar(require("./debouncePromise"), exports);
|
|
22
|
+
tslib_1.__exportStar(require("./decode"), exports);
|
|
23
|
+
tslib_1.__exportStar(require("./Defer"), exports);
|
|
24
|
+
tslib_1.__exportStar(require("./Emitter"), exports);
|
|
25
|
+
tslib_1.__exportStar(require("./encode"), exports);
|
|
26
|
+
tslib_1.__exportStar(require("./ensureInt"), exports);
|
|
24
27
|
// export * from "./env"
|
|
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
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
28
|
+
tslib_1.__exportStar(require("./findDuplicatedIndexes"), exports);
|
|
29
|
+
tslib_1.__exportStar(require("./forin"), exports);
|
|
30
|
+
tslib_1.__exportStar(require("./gbToBytes"), exports);
|
|
31
|
+
tslib_1.__exportStar(require("./getEmptyArray"), exports);
|
|
32
|
+
tslib_1.__exportStar(require("./getKeys"), exports);
|
|
33
|
+
tslib_1.__exportStar(require("./getMediaQueryWidthResolvers"), exports);
|
|
34
|
+
tslib_1.__exportStar(require("./getMediaQueryWidthTailwindScreens"), exports);
|
|
35
|
+
tslib_1.__exportStar(require("./getNonce"), exports);
|
|
36
|
+
tslib_1.__exportStar(require("./getParamAmong"), exports);
|
|
37
|
+
tslib_1.__exportStar(require("./getParamAsInt"), exports);
|
|
38
|
+
tslib_1.__exportStar(require("./getParamAsString"), exports);
|
|
39
|
+
tslib_1.__exportStar(require("./getType"), exports);
|
|
40
|
+
tslib_1.__exportStar(require("./getUrlHashParams"), exports);
|
|
41
|
+
tslib_1.__exportStar(require("./getUrlHashPathname"), exports);
|
|
42
|
+
tslib_1.__exportStar(require("./getUrlPathnameParts"), exports);
|
|
43
|
+
tslib_1.__exportStar(require("./getUrlQueryParams"), exports);
|
|
44
|
+
tslib_1.__exportStar(require("./imgEmptyPixel"), exports);
|
|
45
|
+
tslib_1.__exportStar(require("./isAnyObject"), exports);
|
|
46
|
+
tslib_1.__exportStar(require("./isArray"), exports);
|
|
47
|
+
tslib_1.__exportStar(require("./isBlob"), exports);
|
|
48
|
+
tslib_1.__exportStar(require("./isBoolean"), exports);
|
|
49
|
+
tslib_1.__exportStar(require("./isBrowser"), exports);
|
|
50
|
+
tslib_1.__exportStar(require("./isDate"), exports);
|
|
51
|
+
tslib_1.__exportStar(require("./isEmptyArray"), exports);
|
|
52
|
+
tslib_1.__exportStar(require("./isEmptyObject"), exports);
|
|
53
|
+
tslib_1.__exportStar(require("./isEmptyString"), exports);
|
|
54
|
+
tslib_1.__exportStar(require("./isError"), exports);
|
|
55
|
+
tslib_1.__exportStar(require("./isExternalUrl"), exports);
|
|
56
|
+
tslib_1.__exportStar(require("./isFile"), exports);
|
|
57
|
+
tslib_1.__exportStar(require("./isFloat"), exports);
|
|
58
|
+
tslib_1.__exportStar(require("./isFormData"), exports);
|
|
59
|
+
tslib_1.__exportStar(require("./isFullArray"), exports);
|
|
60
|
+
tslib_1.__exportStar(require("./isFullObject"), exports);
|
|
61
|
+
tslib_1.__exportStar(require("./isFullString"), exports);
|
|
62
|
+
tslib_1.__exportStar(require("./isFunction"), exports);
|
|
63
|
+
tslib_1.__exportStar(require("./isInt"), exports);
|
|
64
|
+
tslib_1.__exportStar(require("./isMap"), exports);
|
|
65
|
+
tslib_1.__exportStar(require("./isNaNValue"), exports);
|
|
66
|
+
tslib_1.__exportStar(require("./isNegativeNumber"), exports);
|
|
67
|
+
tslib_1.__exportStar(require("./isNullOrUndefined"), exports);
|
|
68
|
+
tslib_1.__exportStar(require("./isNull"), exports);
|
|
69
|
+
tslib_1.__exportStar(require("./isNumber"), exports);
|
|
70
|
+
tslib_1.__exportStar(require("./isObjectLike"), exports);
|
|
71
|
+
tslib_1.__exportStar(require("./isObject"), exports);
|
|
72
|
+
tslib_1.__exportStar(require("./isOneOf"), exports);
|
|
73
|
+
tslib_1.__exportStar(require("./isPlainObject"), exports);
|
|
74
|
+
tslib_1.__exportStar(require("./isPositiveNumber"), exports);
|
|
75
|
+
tslib_1.__exportStar(require("./isPrimitive"), exports);
|
|
76
|
+
tslib_1.__exportStar(require("./isPromise"), exports);
|
|
77
|
+
tslib_1.__exportStar(require("./isRegExp"), exports);
|
|
78
|
+
tslib_1.__exportStar(require("./isServer"), exports);
|
|
79
|
+
tslib_1.__exportStar(require("./isSet"), exports);
|
|
80
|
+
tslib_1.__exportStar(require("./isString"), exports);
|
|
81
|
+
tslib_1.__exportStar(require("./isSymbol"), exports);
|
|
82
|
+
tslib_1.__exportStar(require("./isType"), exports);
|
|
83
|
+
tslib_1.__exportStar(require("./isUndefined"), exports);
|
|
84
|
+
tslib_1.__exportStar(require("./isWeakMap"), exports);
|
|
85
|
+
tslib_1.__exportStar(require("./isWeakSet"), exports);
|
|
86
|
+
tslib_1.__exportStar(require("./kbToBytes"), exports);
|
|
87
|
+
tslib_1.__exportStar(require("./location"), exports);
|
|
88
|
+
tslib_1.__exportStar(require("./lowercase"), exports);
|
|
89
|
+
tslib_1.__exportStar(require("./mapListBy"), exports);
|
|
90
|
+
tslib_1.__exportStar(require("./matchSorter"), exports);
|
|
91
|
+
tslib_1.__exportStar(require("./mbToBytes"), exports);
|
|
92
|
+
tslib_1.__exportStar(require("./mergeObjects"), exports);
|
|
93
|
+
tslib_1.__exportStar(require("./mergeUrlQueryParams"), exports);
|
|
94
|
+
tslib_1.__exportStar(require("./moveSortableArrayItemByKey"), exports);
|
|
95
|
+
tslib_1.__exportStar(require("./noop"), exports);
|
|
96
|
+
tslib_1.__exportStar(require("./normaliseUrlPathname"), exports);
|
|
97
|
+
tslib_1.__exportStar(require("./normaliseUrl"), exports);
|
|
98
|
+
tslib_1.__exportStar(require("./objectPick"), exports);
|
|
99
|
+
tslib_1.__exportStar(require("./objectOmit"), exports);
|
|
100
|
+
tslib_1.__exportStar(require("./parseCookie"), exports);
|
|
101
|
+
tslib_1.__exportStar(require("./parseURL"), exports);
|
|
102
|
+
tslib_1.__exportStar(require("./quaranteneProps"), exports);
|
|
103
|
+
tslib_1.__exportStar(require("./randomInt"), exports);
|
|
104
|
+
tslib_1.__exportStar(require("./randomKey"), exports);
|
|
105
|
+
tslib_1.__exportStar(require("./readCookie"), exports);
|
|
106
|
+
tslib_1.__exportStar(require("./removeAccents"), exports);
|
|
107
|
+
tslib_1.__exportStar(require("./removeCookie"), exports);
|
|
105
108
|
// export * from "./removeDuplicates";
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
109
|
+
tslib_1.__exportStar(require("./removeDuplicatesByKey"), exports);
|
|
110
|
+
tslib_1.__exportStar(require("./removeDuplicatesComparing"), exports);
|
|
111
|
+
tslib_1.__exportStar(require("./removeIndexesFromArray"), exports);
|
|
112
|
+
tslib_1.__exportStar(require("./removeTrailingSlash"), exports);
|
|
113
|
+
tslib_1.__exportStar(require("./removeUrlQueryParams"), exports);
|
|
114
|
+
tslib_1.__exportStar(require("./roundTo"), exports);
|
|
115
|
+
tslib_1.__exportStar(require("./serializeCookie"), exports);
|
|
116
|
+
tslib_1.__exportStar(require("./setCookie"), exports);
|
|
117
|
+
tslib_1.__exportStar(require("./shuffle"), exports);
|
|
118
|
+
tslib_1.__exportStar(require("./slugify"), exports);
|
|
119
|
+
tslib_1.__exportStar(require("./swapMap"), exports);
|
|
120
|
+
tslib_1.__exportStar(require("./throttle"), exports);
|
|
121
|
+
tslib_1.__exportStar(require("./titleCase"), exports);
|
|
122
|
+
tslib_1.__exportStar(require("./toNumber"), exports);
|
|
123
|
+
tslib_1.__exportStar(require("./toRgba"), exports);
|
|
124
|
+
tslib_1.__exportStar(require("./transformToUrlPathname"), exports);
|
|
125
|
+
tslib_1.__exportStar(require("./truncate"), exports);
|
|
126
|
+
tslib_1.__exportStar(require("./tryUntil"), exports);
|
|
127
|
+
tslib_1.__exportStar(require("./uid"), exports);
|
|
128
|
+
tslib_1.__exportStar(require("./updateLinkParams"), exports);
|
|
129
|
+
tslib_1.__exportStar(require("./updateUrlQueryParams"), exports);
|
|
130
|
+
tslib_1.__exportStar(require("./uppercase"), exports);
|
|
131
|
+
tslib_1.__exportStar(require("./uuid"), exports);
|
|
132
|
+
tslib_1.__exportStar(require("./uuidNumeric"), exports);
|
|
133
|
+
tslib_1.__exportStar(require("./wait"), exports);
|
|
134
|
+
tslib_1.__exportStar(require("./types"), exports);
|
package/index.mjs
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
export * from "./accentSets";
|
|
2
|
+
export * from "./addOrReplaceAtIdx";
|
|
3
|
+
export * from "./areEqual";
|
|
4
|
+
export * from "./arrayOfAll";
|
|
5
|
+
export * from "./arraySum";
|
|
6
|
+
export * from "./arrayToLookup";
|
|
7
|
+
export * from "./buildUrlQueryString";
|
|
8
|
+
export * from "./capitalize";
|
|
9
|
+
export * from "./changeUrlPath";
|
|
10
|
+
export * from "./chunkByChunks";
|
|
11
|
+
export * from "./chunkBySize";
|
|
12
|
+
export * from "./clamp";
|
|
13
|
+
export * from "./clsx";
|
|
14
|
+
export * from "./convertRange";
|
|
15
|
+
export * from "./cookie";
|
|
16
|
+
export * from "./debounce";
|
|
17
|
+
export * from "./debounceRaf";
|
|
18
|
+
export * from "./debouncePromise";
|
|
19
|
+
export * from "./decode";
|
|
20
|
+
export * from "./Defer";
|
|
21
|
+
export * from "./Emitter";
|
|
22
|
+
export * from "./encode";
|
|
23
|
+
export * from "./ensureInt";
|
|
24
|
+
// export * from "./env"
|
|
25
|
+
export * from "./findDuplicatedIndexes";
|
|
26
|
+
export * from "./forin";
|
|
27
|
+
export * from "./gbToBytes";
|
|
28
|
+
export * from "./getEmptyArray";
|
|
29
|
+
export * from "./getKeys";
|
|
30
|
+
export * from "./getMediaQueryWidthResolvers";
|
|
31
|
+
export * from "./getMediaQueryWidthTailwindScreens";
|
|
32
|
+
export * from "./getNonce";
|
|
33
|
+
export * from "./getParamAmong";
|
|
34
|
+
export * from "./getParamAsInt";
|
|
35
|
+
export * from "./getParamAsString";
|
|
36
|
+
export * from "./getType";
|
|
37
|
+
export * from "./getUrlHashParams";
|
|
38
|
+
export * from "./getUrlHashPathname";
|
|
39
|
+
export * from "./getUrlPathnameParts";
|
|
40
|
+
export * from "./getUrlQueryParams";
|
|
41
|
+
export * from "./imgEmptyPixel";
|
|
42
|
+
export * from "./isAnyObject";
|
|
43
|
+
export * from "./isArray";
|
|
44
|
+
export * from "./isBlob";
|
|
45
|
+
export * from "./isBoolean";
|
|
46
|
+
export * from "./isBrowser";
|
|
47
|
+
export * from "./isDate";
|
|
48
|
+
export * from "./isEmptyArray";
|
|
49
|
+
export * from "./isEmptyObject";
|
|
50
|
+
export * from "./isEmptyString";
|
|
51
|
+
export * from "./isError";
|
|
52
|
+
export * from "./isExternalUrl";
|
|
53
|
+
export * from "./isFile";
|
|
54
|
+
export * from "./isFloat";
|
|
55
|
+
export * from "./isFormData";
|
|
56
|
+
export * from "./isFullArray";
|
|
57
|
+
export * from "./isFullObject";
|
|
58
|
+
export * from "./isFullString";
|
|
59
|
+
export * from "./isFunction";
|
|
60
|
+
export * from "./isInt";
|
|
61
|
+
export * from "./isMap";
|
|
62
|
+
export * from "./isNaNValue";
|
|
63
|
+
export * from "./isNegativeNumber";
|
|
64
|
+
export * from "./isNullOrUndefined";
|
|
65
|
+
export * from "./isNull";
|
|
66
|
+
export * from "./isNumber";
|
|
67
|
+
export * from "./isObjectLike";
|
|
68
|
+
export * from "./isObject";
|
|
69
|
+
export * from "./isOneOf";
|
|
70
|
+
export * from "./isPlainObject";
|
|
71
|
+
export * from "./isPositiveNumber";
|
|
72
|
+
export * from "./isPrimitive";
|
|
73
|
+
export * from "./isPromise";
|
|
74
|
+
export * from "./isRegExp";
|
|
75
|
+
export * from "./isServer";
|
|
76
|
+
export * from "./isSet";
|
|
77
|
+
export * from "./isString";
|
|
78
|
+
export * from "./isSymbol";
|
|
79
|
+
export * from "./isType";
|
|
80
|
+
export * from "./isUndefined";
|
|
81
|
+
export * from "./isWeakMap";
|
|
82
|
+
export * from "./isWeakSet";
|
|
83
|
+
export * from "./kbToBytes";
|
|
84
|
+
export * from "./location";
|
|
85
|
+
export * from "./lowercase";
|
|
86
|
+
export * from "./mapListBy";
|
|
87
|
+
export * from "./matchSorter";
|
|
88
|
+
export * from "./mbToBytes";
|
|
89
|
+
export * from "./mergeObjects";
|
|
90
|
+
export * from "./mergeUrlQueryParams";
|
|
91
|
+
export * from "./moveSortableArrayItemByKey";
|
|
92
|
+
export * from "./noop";
|
|
93
|
+
export * from "./normaliseUrlPathname";
|
|
94
|
+
export * from "./normaliseUrl";
|
|
95
|
+
export * from "./objectPick";
|
|
96
|
+
export * from "./objectOmit";
|
|
97
|
+
export * from "./parseCookie";
|
|
98
|
+
export * from "./parseURL";
|
|
99
|
+
export * from "./quaranteneProps";
|
|
100
|
+
export * from "./randomInt";
|
|
101
|
+
export * from "./randomKey";
|
|
102
|
+
export * from "./readCookie";
|
|
103
|
+
export * from "./removeAccents";
|
|
104
|
+
export * from "./removeCookie";
|
|
105
|
+
// export * from "./removeDuplicates";
|
|
106
|
+
export * from "./removeDuplicatesByKey";
|
|
107
|
+
export * from "./removeDuplicatesComparing";
|
|
108
|
+
export * from "./removeIndexesFromArray";
|
|
109
|
+
export * from "./removeTrailingSlash";
|
|
110
|
+
export * from "./removeUrlQueryParams";
|
|
111
|
+
export * from "./roundTo";
|
|
112
|
+
export * from "./serializeCookie";
|
|
113
|
+
export * from "./setCookie";
|
|
114
|
+
export * from "./shuffle";
|
|
115
|
+
export * from "./slugify";
|
|
116
|
+
export * from "./swapMap";
|
|
117
|
+
export * from "./throttle";
|
|
118
|
+
export * from "./titleCase";
|
|
119
|
+
export * from "./toNumber";
|
|
120
|
+
export * from "./toRgba";
|
|
121
|
+
export * from "./transformToUrlPathname";
|
|
122
|
+
export * from "./truncate";
|
|
123
|
+
export * from "./tryUntil";
|
|
124
|
+
export * from "./uid";
|
|
125
|
+
export * from "./updateLinkParams";
|
|
126
|
+
export * from "./updateUrlQueryParams";
|
|
127
|
+
export * from "./uppercase";
|
|
128
|
+
export * from "./uuid";
|
|
129
|
+
export * from "./uuidNumeric";
|
|
130
|
+
export * from "./wait";
|
|
131
|
+
export * from "./types";
|
package/invariant.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.invariant = void 0;
|
|
1
4
|
/**
|
|
2
5
|
* FIXME: invariant calls do not get tree shaked in minified output of projects
|
|
3
6
|
* using it. Let's not use it internally and not export it from `@koine/utils`
|
|
@@ -15,7 +18,7 @@
|
|
|
15
18
|
* @param lib The library name to show in the error message prefix. When `lib` is also specified it outputs `[lib:prefix]: the message`, otherwise just `[lib|prefix]: the message`)
|
|
16
19
|
* @param prefix The library name to show in the error message prefix. When `lib` is also specified it outputs `[lib:prefix]: the message`, otherwise just `[lib|prefix]: the message`)
|
|
17
20
|
*/
|
|
18
|
-
|
|
21
|
+
function invariant(condition, message, lib, prefix) {
|
|
19
22
|
if (process.env["NODE_ENV"] !== "production") {
|
|
20
23
|
if (condition) {
|
|
21
24
|
return;
|
|
@@ -31,4 +34,5 @@ export function invariant(condition, message, lib, prefix) {
|
|
|
31
34
|
throw new Error(msgPrefix + msgProvided);
|
|
32
35
|
}
|
|
33
36
|
}
|
|
34
|
-
|
|
37
|
+
exports.invariant = invariant;
|
|
38
|
+
exports.default = invariant;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.invariant = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* FIXME: invariant calls do not get tree shaked in minified output of projects
|
|
6
3
|
* using it. Let's not use it internally and not export it from `@koine/utils`
|
|
@@ -18,7 +15,7 @@ exports.invariant = void 0;
|
|
|
18
15
|
* @param lib The library name to show in the error message prefix. When `lib` is also specified it outputs `[lib:prefix]: the message`, otherwise just `[lib|prefix]: the message`)
|
|
19
16
|
* @param prefix The library name to show in the error message prefix. When `lib` is also specified it outputs `[lib:prefix]: the message`, otherwise just `[lib|prefix]: the message`)
|
|
20
17
|
*/
|
|
21
|
-
function invariant(condition, message, lib, prefix) {
|
|
18
|
+
export function invariant(condition, message, lib, prefix) {
|
|
22
19
|
if (process.env["NODE_ENV"] !== "production") {
|
|
23
20
|
if (condition) {
|
|
24
21
|
return;
|
|
@@ -34,5 +31,4 @@ function invariant(condition, message, lib, prefix) {
|
|
|
34
31
|
throw new Error(msgPrefix + msgProvided);
|
|
35
32
|
}
|
|
36
33
|
}
|
|
37
|
-
|
|
38
|
-
exports.default = invariant;
|
|
34
|
+
export default invariant;
|
package/isAnyObject.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isAnyObject = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
2
6
|
/**
|
|
3
7
|
* Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
|
|
4
8
|
*
|
|
5
9
|
* @category is
|
|
6
10
|
*/
|
|
7
|
-
|
|
8
|
-
return
|
|
11
|
+
function isAnyObject(payload) {
|
|
12
|
+
return (0, getType_1.default)(payload) === "Object";
|
|
9
13
|
}
|
|
10
|
-
|
|
14
|
+
exports.isAnyObject = isAnyObject;
|
|
15
|
+
exports.default = isAnyObject;
|
package/isAnyObject.mjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import getType from "./getType";
|
|
2
|
+
/**
|
|
3
|
+
* Returns whether the payload is an any kind of object (including special classes or objects with different prototypes)
|
|
4
|
+
*
|
|
5
|
+
* @category is
|
|
6
|
+
*/
|
|
7
|
+
export function isAnyObject(payload) {
|
|
8
|
+
return getType(payload) === "Object";
|
|
9
|
+
}
|
|
10
|
+
export default isAnyObject;
|
package/isArray.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isArray = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
2
6
|
/**
|
|
3
7
|
* Returns whether the payload is an array
|
|
4
8
|
*
|
|
5
9
|
* @category is
|
|
6
10
|
*/
|
|
7
|
-
|
|
8
|
-
return
|
|
11
|
+
function isArray(payload) {
|
|
12
|
+
return (0, getType_1.default)(payload) === "Array";
|
|
9
13
|
}
|
|
10
|
-
|
|
14
|
+
exports.isArray = isArray;
|
|
15
|
+
exports.default = isArray;
|
package/isArray.mjs
ADDED
package/isBlob.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isBlob = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
2
6
|
/**
|
|
3
7
|
* Returns whether the payload is a Blob
|
|
4
8
|
*
|
|
5
9
|
* @category is
|
|
6
10
|
*/
|
|
7
|
-
|
|
8
|
-
return
|
|
11
|
+
function isBlob(payload) {
|
|
12
|
+
return (0, getType_1.default)(payload) === "Blob";
|
|
9
13
|
}
|
|
10
|
-
|
|
14
|
+
exports.isBlob = isBlob;
|
|
15
|
+
exports.default = isBlob;
|
package/isBlob.mjs
ADDED
package/isBoolean.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isBoolean = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
2
6
|
/**
|
|
3
7
|
* Returns whether the payload is a boolean
|
|
4
8
|
*
|
|
5
9
|
* @category is
|
|
6
10
|
*/
|
|
7
|
-
|
|
8
|
-
return
|
|
11
|
+
function isBoolean(payload) {
|
|
12
|
+
return (0, getType_1.default)(payload) === "Boolean";
|
|
9
13
|
}
|
|
10
|
-
|
|
14
|
+
exports.isBoolean = isBoolean;
|
|
15
|
+
exports.default = isBoolean;
|
package/isBoolean.mjs
ADDED
package/isBrowser.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
// import { isUndefined } from "./is";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.isBrowser = void 0;
|
|
2
5
|
/**
|
|
3
6
|
* @category ssr
|
|
4
7
|
* @category is
|
|
5
8
|
*/
|
|
6
|
-
|
|
9
|
+
exports.isBrowser = typeof window !== "undefined";
|
|
7
10
|
// export const isBrowser = () => !isUndefined(window);
|
|
8
|
-
|
|
11
|
+
exports.default = exports.isBrowser;
|
package/isBrowser.mjs
ADDED
package/isDate.js
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isDate = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var getType_1 = tslib_1.__importDefault(require("./getType"));
|
|
2
6
|
/**
|
|
3
7
|
* Returns whether the payload is a Date, and that the date is valid
|
|
4
8
|
*
|
|
5
9
|
* @category is
|
|
6
10
|
*/
|
|
7
|
-
|
|
8
|
-
return
|
|
11
|
+
function isDate(payload) {
|
|
12
|
+
return (0, getType_1.default)(payload) === "Date" && !isNaN(payload);
|
|
9
13
|
}
|
|
10
|
-
|
|
14
|
+
exports.isDate = isDate;
|
|
15
|
+
exports.default = isDate;
|
package/isDate.mjs
ADDED