@koine/utils 1.0.26 → 1.0.29
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/{async.d.ts → Defer.d.ts} +5 -5
- package/{async.js → Defer.js} +2 -7
- package/{emitter.d.ts → Emitter.d.ts} +1 -0
- package/{emitter.js → Emitter.js} +1 -0
- package/accentSets.d.ts +16 -0
- package/accentSets.js +38 -0
- package/addOrReplaceAtIdx.d.ts +5 -0
- package/addOrReplaceAtIdx.js +19 -0
- package/arrayToLookup.d.ts +7 -0
- package/arrayToLookup.js +13 -0
- package/buildUrlQueryString.d.ts +12 -0
- package/buildUrlQueryString.js +24 -0
- package/changeUrlPath.d.ts +10 -0
- package/changeUrlPath.js +18 -0
- package/chunkByChunks.d.ts +7 -0
- package/chunkByChunks.js +37 -0
- package/chunkBySize.d.ts +6 -0
- package/chunkBySize.js +12 -0
- package/clamp.d.ts +8 -0
- package/clamp.js +10 -0
- package/clsx.d.ts +9 -0
- package/clsx.js +49 -0
- package/convertRange.d.ts +14 -0
- package/convertRange.js +16 -0
- package/cookie.d.ts +7 -26
- package/cookie.js +3 -221
- package/decode.d.ts +6 -0
- package/decode.js +10 -0
- package/encode.d.ts +6 -0
- package/encode.js +10 -0
- package/{cast.d.ts → ensureInt.d.ts} +3 -1
- package/{cast.js → ensureInt.js} +3 -4
- package/findDuplicatedIndexes.d.ts +5 -0
- package/findDuplicatedIndexes.js +14 -0
- package/getKeys.d.ts +9 -0
- package/getKeys.js +9 -0
- package/getNonce.d.ts +6 -0
- package/getNonce.js +9 -0
- package/getType.d.ts +22 -0
- package/getType.js +19 -0
- package/getUrlHashParams.d.ts +9 -0
- package/getUrlHashParams.js +16 -0
- package/getUrlHashPathname.d.ts +9 -0
- package/getUrlHashPathname.js +13 -0
- package/getUrlPathnameParts.d.ts +12 -0
- package/getUrlPathnameParts.js +20 -0
- package/getUrlQueryParams.d.ts +14 -0
- package/getUrlQueryParams.js +38 -0
- package/index.d.ts +107 -15
- package/index.js +108 -16
- package/isAnyObject.d.ts +8 -0
- package/isAnyObject.js +10 -0
- package/isArray.d.ts +7 -0
- package/isArray.js +10 -0
- package/isBlob.d.ts +7 -0
- package/isBlob.js +10 -0
- package/isBoolean.d.ts +7 -0
- package/isBoolean.js +10 -0
- package/isBrowser.d.ts +6 -0
- package/{ssr.js → isBrowser.js} +5 -2
- package/isDate.d.ts +7 -0
- package/isDate.js +10 -0
- package/isEmptyArray.d.ts +7 -0
- package/isEmptyArray.js +10 -0
- package/isEmptyObject.d.ts +9 -0
- package/isEmptyObject.js +10 -0
- package/isEmptyString.d.ts +7 -0
- package/isEmptyString.js +9 -0
- package/isError.d.ts +7 -0
- package/isError.js +10 -0
- package/isExternalUrl.d.ts +9 -0
- package/isExternalUrl.js +21 -0
- package/isFile.d.ts +7 -0
- package/isFile.js +10 -0
- package/isFloat.d.ts +7 -0
- package/isFloat.js +10 -0
- package/isFormData.d.ts +7 -0
- package/isFormData.js +10 -0
- package/isFullArray.d.ts +7 -0
- package/isFullArray.js +10 -0
- package/isFullObject.d.ts +8 -0
- package/isFullObject.js +10 -0
- package/isFullString.d.ts +7 -0
- package/isFullString.js +10 -0
- package/isFunction.d.ts +8 -0
- package/isFunction.js +9 -0
- package/{detect.d.ts → isIE.d.ts} +3 -4
- package/isIE.js +18 -0
- package/isInt.d.ts +7 -0
- package/isInt.js +10 -0
- package/isMap.d.ts +7 -0
- package/isMap.js +10 -0
- package/isMobile.d.ts +7 -0
- package/{detect.js → isMobile.js} +4 -15
- package/isNaNValue.d.ts +7 -0
- package/isNaNValue.js +10 -0
- package/isNegativeNumber.d.ts +7 -0
- package/isNegativeNumber.js +10 -0
- package/isNull.d.ts +7 -0
- package/isNull.js +10 -0
- package/isNullOrUndefined.d.ts +7 -0
- package/isNullOrUndefined.js +10 -0
- package/isNumber.d.ts +9 -0
- package/isNumber.js +12 -0
- package/isObject.d.ts +8 -0
- package/isObject.js +10 -0
- package/isObjectLike.d.ts +10 -0
- package/isObjectLike.js +12 -0
- package/isOneOf.d.ts +9 -0
- package/isOneOf.js +10 -0
- package/isPlainObject.d.ts +8 -0
- package/isPlainObject.js +13 -0
- package/isPositiveNumber.d.ts +7 -0
- package/isPositiveNumber.js +10 -0
- package/isPrimitive.d.ts +7 -0
- package/isPrimitive.js +20 -0
- package/isPromise.d.ts +7 -0
- package/isPromise.js +10 -0
- package/isRegExp.d.ts +7 -0
- package/isRegExp.js +10 -0
- package/isServer.d.ts +6 -0
- package/isServer.js +8 -0
- package/isSet.d.ts +7 -0
- package/isSet.js +10 -0
- package/isString.d.ts +7 -0
- package/isString.js +10 -0
- package/isSymbol.d.ts +7 -0
- package/isSymbol.js +10 -0
- package/isType.d.ts +11 -0
- package/isType.js +22 -0
- package/isUndefined.d.ts +7 -0
- package/isUndefined.js +10 -0
- package/isWeakMap.d.ts +7 -0
- package/isWeakMap.js +10 -0
- package/isWeakSet.d.ts +7 -0
- package/isWeakSet.js +10 -0
- package/location.d.ts +2 -145
- package/location.js +1 -299
- package/mapListBy.d.ts +7 -0
- package/mapListBy.js +14 -0
- package/{match-sorter.d.ts → matchSorter.d.ts} +1 -0
- package/{match-sorter.js → matchSorter.js} +2 -1
- package/mergeObjects.d.ts +7 -0
- package/{objects.js → mergeObjects.js} +2 -31
- package/mergeUrlQueryParams.d.ts +9 -0
- package/mergeUrlQueryParams.js +22 -0
- package/navigateToHashParams.d.ts +9 -0
- package/navigateToHashParams.js +22 -0
- package/navigateToMergedHashParams.d.ts +8 -0
- package/navigateToMergedHashParams.js +14 -0
- package/navigateToMergedParams.d.ts +9 -0
- package/navigateToMergedParams.js +14 -0
- package/navigateToParams.d.ts +10 -0
- package/navigateToParams.js +18 -0
- package/navigateWithoutUrlParam.d.ts +8 -0
- package/navigateWithoutUrlParam.js +19 -0
- package/node/{async.js → Defer.js} +3 -9
- package/node/{emitter.js → Emitter.js} +1 -0
- package/node/accentSets.js +41 -0
- package/node/addOrReplaceAtIdx.js +23 -0
- package/node/arrayToLookup.js +17 -0
- package/node/buildUrlQueryString.js +28 -0
- package/node/changeUrlPath.js +22 -0
- package/node/chunkByChunks.js +41 -0
- package/node/chunkBySize.js +16 -0
- package/node/clamp.js +14 -0
- package/node/clsx.js +53 -0
- package/node/convertRange.js +20 -0
- package/node/cookie.js +4 -227
- package/node/decode.js +14 -0
- package/node/encode.js +14 -0
- package/node/{cast.js → ensureInt.js} +4 -6
- package/node/findDuplicatedIndexes.js +18 -0
- package/node/getKeys.js +12 -0
- package/node/getNonce.js +13 -0
- package/node/getType.js +23 -0
- package/node/getUrlHashParams.js +20 -0
- package/node/getUrlHashPathname.js +17 -0
- package/node/getUrlPathnameParts.js +24 -0
- package/node/getUrlQueryParams.js +42 -0
- package/node/index.js +108 -16
- package/node/isAnyObject.js +14 -0
- package/node/isArray.js +14 -0
- package/node/isBlob.js +14 -0
- package/node/isBoolean.js +14 -0
- package/node/{ssr.js → isBrowser.js} +6 -3
- package/node/isDate.js +14 -0
- package/node/isEmptyArray.js +14 -0
- package/node/isEmptyObject.js +14 -0
- package/node/isEmptyString.js +13 -0
- package/node/isError.js +14 -0
- package/node/isExternalUrl.js +25 -0
- package/node/isFile.js +14 -0
- package/node/isFloat.js +14 -0
- package/node/isFormData.js +14 -0
- package/node/isFullArray.js +14 -0
- package/node/isFullObject.js +14 -0
- package/node/isFullString.js +14 -0
- package/node/isFunction.js +13 -0
- package/node/isIE.js +22 -0
- package/node/isInt.js +14 -0
- package/node/isMap.js +14 -0
- package/node/{detect.js → isMobile.js} +6 -18
- package/node/isNaNValue.js +14 -0
- package/node/isNegativeNumber.js +14 -0
- package/node/isNull.js +14 -0
- package/node/isNullOrUndefined.js +13 -0
- package/node/isNumber.js +16 -0
- package/node/isObject.js +14 -0
- package/node/isObjectLike.js +16 -0
- package/node/isOneOf.js +14 -0
- package/node/isPlainObject.js +17 -0
- package/node/isPositiveNumber.js +14 -0
- package/node/isPrimitive.js +24 -0
- package/node/isPromise.js +14 -0
- package/node/isRegExp.js +14 -0
- package/node/isServer.js +11 -0
- package/node/isSet.js +14 -0
- package/node/isString.js +14 -0
- package/node/isSymbol.js +14 -0
- package/node/isType.js +26 -0
- package/node/isUndefined.js +14 -0
- package/node/isWeakMap.js +14 -0
- package/node/isWeakSet.js +14 -0
- package/node/location.js +0 -321
- package/node/mapListBy.js +18 -0
- package/node/{match-sorter.js → matchSorter.js} +3 -2
- package/node/{objects.js → mergeObjects.js} +5 -36
- package/node/mergeUrlQueryParams.js +26 -0
- package/node/navigateToHashParams.js +26 -0
- package/node/navigateToMergedHashParams.js +18 -0
- package/node/navigateToMergedParams.js +18 -0
- package/node/navigateToParams.js +22 -0
- package/node/navigateWithoutUrlParam.js +23 -0
- package/node/normaliseUrl.js +18 -0
- package/node/normaliseUrlPathname.js +18 -0
- package/node/{analytics-google.js → pageview.js} +12 -10
- package/node/parseCookie.js +52 -0
- package/node/parseURL.js +24 -0
- package/node/randomInt.js +13 -0
- package/node/{misc.js → randomKey.js} +2 -0
- package/node/readCookie.js +38 -0
- package/node/redirectTo.js +19 -0
- package/node/removeAccents.js +19 -0
- package/node/removeCookie.js +19 -0
- package/node/removeDuplicatesByKey.js +25 -0
- package/node/removeDuplicatesComparing.js +14 -0
- package/node/removeIndexesFromArray.js +18 -0
- package/node/removeTrailingSlash.js +14 -0
- package/node/{math.js → roundTo.js} +3 -32
- package/node/serializeCookie.js +108 -0
- package/node/setCookie.js +61 -0
- package/node/shuffle.js +36 -0
- package/node/slugify.js +27 -0
- package/node/swapMap.js +18 -0
- package/node/{typography.js → titleCase.js} +3 -12
- package/node/toNumber.js +12 -0
- package/node/{colors.js → toRgba.js} +4 -0
- package/node/transformToUrlPathname.js +20 -0
- package/node/truncate.js +17 -0
- package/node/uid.js +4 -13
- package/node/updateLinkParams.js +18 -0
- package/node/updateUrlQueryParams.js +22 -0
- package/node/uuid.js +17 -0
- package/node/wait.js +13 -0
- package/node/whitelistObject.js +19 -0
- package/normaliseUrl.d.ts +10 -0
- package/normaliseUrl.js +14 -0
- package/normaliseUrlPathname.d.ts +10 -0
- package/normaliseUrlPathname.js +14 -0
- package/package.json +1 -1
- package/{analytics-google.d.ts → pageview.d.ts} +3 -0
- package/{analytics-google.js → pageview.js} +12 -10
- package/parseCookie.d.ts +11 -0
- package/parseCookie.js +48 -0
- package/parseURL.d.ts +17 -0
- package/parseURL.js +20 -0
- package/randomInt.d.ts +7 -0
- package/randomInt.js +9 -0
- package/{misc.d.ts → randomKey.d.ts} +2 -0
- package/{misc.js → randomKey.js} +2 -0
- package/readCookie.d.ts +3 -0
- package/readCookie.js +34 -0
- package/redirectTo.d.ts +9 -0
- package/redirectTo.js +15 -0
- package/removeAccents.d.ts +6 -0
- package/removeAccents.js +15 -0
- package/removeCookie.d.ts +10 -0
- package/removeCookie.js +15 -0
- package/removeDuplicatesByKey.d.ts +8 -0
- package/removeDuplicatesByKey.js +21 -0
- package/removeDuplicatesComparing.d.ts +5 -0
- package/removeDuplicatesComparing.js +10 -0
- package/removeIndexesFromArray.d.ts +5 -0
- package/removeIndexesFromArray.js +14 -0
- package/removeTrailingSlash.d.ts +7 -0
- package/removeTrailingSlash.js +10 -0
- package/roundTo.d.ts +8 -0
- package/{math.js → roundTo.js} +2 -28
- package/serializeCookie.d.ts +27 -0
- package/serializeCookie.js +104 -0
- package/setCookie.d.ts +10 -0
- package/setCookie.js +57 -0
- package/shuffle.d.ts +16 -0
- package/shuffle.js +32 -0
- package/{text.d.ts → slugify.d.ts} +2 -5
- package/slugify.js +23 -0
- package/swapMap.d.ts +7 -0
- package/swapMap.js +14 -0
- package/{typography.d.ts → titleCase.d.ts} +2 -4
- package/{typography.js → titleCase.js} +2 -10
- package/toNumber.d.ts +5 -0
- package/toNumber.js +8 -0
- package/{colors.d.ts → toRgba.d.ts} +4 -0
- package/{colors.js → toRgba.js} +4 -0
- package/transformToUrlPathname.d.ts +11 -0
- package/transformToUrlPathname.js +16 -0
- package/truncate.d.ts +7 -0
- package/truncate.js +13 -0
- package/uid.d.ts +3 -6
- package/uid.js +3 -11
- package/updateLinkParams.d.ts +10 -0
- package/updateLinkParams.js +14 -0
- package/updateUrlQueryParams.d.ts +9 -0
- package/updateUrlQueryParams.js +18 -0
- package/uuid.d.ts +8 -0
- package/uuid.js +13 -0
- package/wait.d.ts +7 -0
- package/wait.js +9 -0
- package/whitelistObject.d.ts +8 -0
- package/whitelistObject.js +15 -0
- package/arrays.d.ts +0 -41
- package/arrays.js +0 -153
- package/is.d.ts +0 -288
- package/is.js +0 -376
- package/math.d.ts +0 -28
- package/node/arrays.js +0 -166
- package/node/is.js +0 -417
- package/node/security.js +0 -29
- package/node/text.js +0 -70
- package/objects.d.ts +0 -22
- package/security.d.ts +0 -12
- package/security.js +0 -23
- package/ssr.d.ts +0 -2
- package/text.js +0 -65
package/index.d.ts
CHANGED
|
@@ -25,22 +25,114 @@
|
|
|
25
25
|
* About utilities useful examples @see:
|
|
26
26
|
* - https://github.com/chakra-ui/chakra-ui/blob/main/packages/utils/src
|
|
27
27
|
*/
|
|
28
|
-
export * from "./
|
|
29
|
-
export * from "./
|
|
30
|
-
export * from "./
|
|
31
|
-
export * from "./
|
|
28
|
+
export * from "./accentSets";
|
|
29
|
+
export * from "./addOrReplaceAtIdx";
|
|
30
|
+
export * from "./arrayToLookup";
|
|
31
|
+
export * from "./buildUrlQueryString";
|
|
32
|
+
export * from "./changeUrlPath";
|
|
33
|
+
export * from "./chunkByChunks";
|
|
34
|
+
export * from "./chunkBySize";
|
|
35
|
+
export * from "./clamp";
|
|
36
|
+
export * from "./clsx";
|
|
37
|
+
export * from "./convertRange";
|
|
32
38
|
export * from "./cookie";
|
|
33
|
-
export * from "./
|
|
34
|
-
export * from "./
|
|
35
|
-
export * from "./
|
|
39
|
+
export * from "./decode";
|
|
40
|
+
export * from "./Defer";
|
|
41
|
+
export * from "./Emitter";
|
|
42
|
+
export * from "./encode";
|
|
43
|
+
export * from "./ensureInt";
|
|
44
|
+
export * from "./findDuplicatedIndexes";
|
|
45
|
+
export * from "./getKeys";
|
|
46
|
+
export * from "./getNonce";
|
|
47
|
+
export * from "./getType";
|
|
48
|
+
export * from "./getUrlHashParams";
|
|
49
|
+
export * from "./getUrlHashPathname";
|
|
50
|
+
export * from "./getUrlPathnameParts";
|
|
51
|
+
export * from "./getUrlQueryParams";
|
|
52
|
+
export * from "./index";
|
|
53
|
+
export * from "./isAnyObject";
|
|
54
|
+
export * from "./isArray";
|
|
55
|
+
export * from "./isBlob";
|
|
56
|
+
export * from "./isBoolean";
|
|
57
|
+
export * from "./isBrowser";
|
|
58
|
+
export * from "./isDate";
|
|
59
|
+
export * from "./isEmptyArray";
|
|
60
|
+
export * from "./isEmptyObject";
|
|
61
|
+
export * from "./isEmptyString";
|
|
62
|
+
export * from "./isError";
|
|
63
|
+
export * from "./isExternalUrl";
|
|
64
|
+
export * from "./isFile";
|
|
65
|
+
export * from "./isFloat";
|
|
66
|
+
export * from "./isFormData";
|
|
67
|
+
export * from "./isFullArray";
|
|
68
|
+
export * from "./isFullObject";
|
|
69
|
+
export * from "./isFullString";
|
|
70
|
+
export * from "./isFunction";
|
|
71
|
+
export * from "./isIE";
|
|
72
|
+
export * from "./isInt";
|
|
73
|
+
export * from "./isMap";
|
|
74
|
+
export * from "./isMobile";
|
|
75
|
+
export * from "./isNaNValue";
|
|
76
|
+
export * from "./isNegativeNumber";
|
|
77
|
+
export * from "./isNullOrUndefined";
|
|
78
|
+
export * from "./isNull";
|
|
79
|
+
export * from "./isNumber";
|
|
80
|
+
export * from "./isObjectLike";
|
|
81
|
+
export * from "./isObject";
|
|
82
|
+
export * from "./isOneOf";
|
|
83
|
+
export * from "./isPlainObject";
|
|
84
|
+
export * from "./isPositiveNumber";
|
|
85
|
+
export * from "./isPrimitive";
|
|
86
|
+
export * from "./isPromise";
|
|
87
|
+
export * from "./isRegExp";
|
|
88
|
+
export * from "./isServer";
|
|
89
|
+
export * from "./isSet";
|
|
90
|
+
export * from "./isString";
|
|
91
|
+
export * from "./isSymbol";
|
|
92
|
+
export * from "./isType";
|
|
93
|
+
export * from "./isUndefined";
|
|
94
|
+
export * from "./isWeakMap";
|
|
95
|
+
export * from "./isWeakSet";
|
|
36
96
|
export * from "./location";
|
|
37
|
-
export * from "./
|
|
38
|
-
export * from "./
|
|
39
|
-
export * from "./
|
|
40
|
-
export * from "./
|
|
41
|
-
export * from "./
|
|
42
|
-
export * from "./
|
|
43
|
-
export * from "./
|
|
44
|
-
export * from "./
|
|
97
|
+
export * from "./mapListBy";
|
|
98
|
+
export * from "./matchSorter";
|
|
99
|
+
export * from "./mergeObjects";
|
|
100
|
+
export * from "./mergeUrlQueryParams";
|
|
101
|
+
export * from "./navigateToHashParams";
|
|
102
|
+
export * from "./navigateToMergedHashParams";
|
|
103
|
+
export * from "./navigateToMergedParams";
|
|
104
|
+
export * from "./navigateToParams";
|
|
105
|
+
export * from "./navigateWithoutUrlParam";
|
|
106
|
+
export * from "./normaliseUrlPathname";
|
|
107
|
+
export * from "./normaliseUrl";
|
|
108
|
+
export * from "./pageview";
|
|
109
|
+
export * from "./parseCookie";
|
|
110
|
+
export * from "./parseURL";
|
|
111
|
+
export * from "./randomInt";
|
|
112
|
+
export * from "./randomKey";
|
|
113
|
+
export * from "./readCookie";
|
|
114
|
+
export * from "./redirectTo";
|
|
115
|
+
export * from "./removeAccents";
|
|
116
|
+
export * from "./removeCookie";
|
|
117
|
+
export * from "./removeDuplicatesByKey";
|
|
118
|
+
export * from "./removeDuplicatesComparing";
|
|
119
|
+
export * from "./removeIndexesFromArray";
|
|
120
|
+
export * from "./removeTrailingSlash";
|
|
121
|
+
export * from "./roundTo";
|
|
122
|
+
export * from "./serializeCookie";
|
|
123
|
+
export * from "./setCookie";
|
|
124
|
+
export * from "./shuffle";
|
|
125
|
+
export * from "./slugify";
|
|
126
|
+
export * from "./swapMap";
|
|
127
|
+
export * from "./titleCase";
|
|
128
|
+
export * from "./toNumber";
|
|
129
|
+
export * from "./toRgba";
|
|
130
|
+
export * from "./transformToUrlPathname";
|
|
131
|
+
export * from "./truncate";
|
|
45
132
|
export * from "./uid";
|
|
133
|
+
export * from "./updateLinkParams";
|
|
134
|
+
export * from "./updateUrlQueryParams";
|
|
135
|
+
export * from "./uuid";
|
|
136
|
+
export * from "./wait";
|
|
137
|
+
export * from "./whitelistObject";
|
|
46
138
|
export type { Primitive, Class, Constructor, TypedArray, ObservableLike, Except, Mutable, Merge, MergeExclusive, RequireAtLeastOne, RequireExactlyOne, RequireAllOrNone, RemoveIndexSignature, PartialDeep, ReadonlyDeep, LiteralUnion, Opaque, InvariantOf, SetOptional, SetRequired, ValueOf, ConditionalKeys, ConditionalPick, ConditionalExcept, UnionToIntersection, LiteralToPrimitive, Stringified, IterableElement, Entry, Entries, SetReturnType, Simplify, Get, StringKeyOf, Schema, Jsonify, JsonPrimitive, JsonObject, JsonArray, JsonValue, Promisable, AsyncReturnType, Asyncify, Trim, Split, Includes, Join, LastArrayElement, FixedLengthArray, MultidimensionalArray, MultidimensionalReadonlyArray, PositiveInfinity, NegativeInfinity, Finite, Integer, Float, NegativeFloat, Negative, NonNegative, NegativeInteger, NonNegativeInteger, CamelCase, CamelCasedProperties, CamelCasedPropertiesDeep, KebabCase, KebabCasedProperties, KebabCasedPropertiesDeep, PascalCase, PascalCasedProperties, PascalCasedPropertiesDeep, SnakeCase, SnakeCasedProperties, SnakeCasedPropertiesDeep, ScreamingSnakeCase, DelimiterCase, DelimiterCasedProperties, DelimiterCasedPropertiesDeep, PackageJson, TsConfigJson, } from "type-fest";
|
package/index.js
CHANGED
|
@@ -25,22 +25,114 @@
|
|
|
25
25
|
* About utilities useful examples @see:
|
|
26
26
|
* - https://github.com/chakra-ui/chakra-ui/blob/main/packages/utils/src
|
|
27
27
|
*/
|
|
28
|
-
export * from "./
|
|
29
|
-
export * from "./
|
|
30
|
-
export * from "./
|
|
31
|
-
export * from "./
|
|
28
|
+
export * from "./accentSets";
|
|
29
|
+
export * from "./addOrReplaceAtIdx";
|
|
30
|
+
export * from "./arrayToLookup";
|
|
31
|
+
export * from "./buildUrlQueryString";
|
|
32
|
+
export * from "./changeUrlPath";
|
|
33
|
+
export * from "./chunkByChunks";
|
|
34
|
+
export * from "./chunkBySize";
|
|
35
|
+
export * from "./clamp";
|
|
36
|
+
export * from "./clsx";
|
|
37
|
+
export * from "./convertRange";
|
|
32
38
|
export * from "./cookie";
|
|
33
|
-
export * from "./
|
|
34
|
-
|
|
35
|
-
export * from "./
|
|
36
|
-
export * from "./
|
|
39
|
+
export * from "./decode";
|
|
40
|
+
export * from "./Defer";
|
|
41
|
+
export * from "./Emitter";
|
|
42
|
+
export * from "./encode";
|
|
43
|
+
export * from "./ensureInt";
|
|
44
|
+
// export * from "./env"
|
|
45
|
+
export * from "./findDuplicatedIndexes";
|
|
46
|
+
export * from "./getKeys";
|
|
47
|
+
export * from "./getNonce";
|
|
48
|
+
export * from "./getType";
|
|
49
|
+
export * from "./getUrlHashParams";
|
|
50
|
+
export * from "./getUrlHashPathname";
|
|
51
|
+
export * from "./getUrlPathnameParts";
|
|
52
|
+
export * from "./getUrlQueryParams";
|
|
53
|
+
export * from "./index";
|
|
54
|
+
export * from "./isAnyObject";
|
|
55
|
+
export * from "./isArray";
|
|
56
|
+
export * from "./isBlob";
|
|
57
|
+
export * from "./isBoolean";
|
|
58
|
+
export * from "./isBrowser";
|
|
59
|
+
export * from "./isDate";
|
|
60
|
+
export * from "./isEmptyArray";
|
|
61
|
+
export * from "./isEmptyObject";
|
|
62
|
+
export * from "./isEmptyString";
|
|
63
|
+
export * from "./isError";
|
|
64
|
+
export * from "./isExternalUrl";
|
|
65
|
+
export * from "./isFile";
|
|
66
|
+
export * from "./isFloat";
|
|
67
|
+
export * from "./isFormData";
|
|
68
|
+
export * from "./isFullArray";
|
|
69
|
+
export * from "./isFullObject";
|
|
70
|
+
export * from "./isFullString";
|
|
71
|
+
export * from "./isFunction";
|
|
72
|
+
export * from "./isIE";
|
|
73
|
+
export * from "./isInt";
|
|
74
|
+
export * from "./isMap";
|
|
75
|
+
export * from "./isMobile";
|
|
76
|
+
export * from "./isNaNValue";
|
|
77
|
+
export * from "./isNegativeNumber";
|
|
78
|
+
export * from "./isNullOrUndefined";
|
|
79
|
+
export * from "./isNull";
|
|
80
|
+
export * from "./isNumber";
|
|
81
|
+
export * from "./isObjectLike";
|
|
82
|
+
export * from "./isObject";
|
|
83
|
+
export * from "./isOneOf";
|
|
84
|
+
export * from "./isPlainObject";
|
|
85
|
+
export * from "./isPositiveNumber";
|
|
86
|
+
export * from "./isPrimitive";
|
|
87
|
+
export * from "./isPromise";
|
|
88
|
+
export * from "./isRegExp";
|
|
89
|
+
export * from "./isServer";
|
|
90
|
+
export * from "./isSet";
|
|
91
|
+
export * from "./isString";
|
|
92
|
+
export * from "./isSymbol";
|
|
93
|
+
export * from "./isType";
|
|
94
|
+
export * from "./isUndefined";
|
|
95
|
+
export * from "./isWeakMap";
|
|
96
|
+
export * from "./isWeakSet";
|
|
37
97
|
export * from "./location";
|
|
38
|
-
export * from "./
|
|
39
|
-
export * from "./
|
|
40
|
-
export * from "./
|
|
41
|
-
export * from "./
|
|
42
|
-
export * from "./
|
|
43
|
-
export * from "./
|
|
44
|
-
export * from "./
|
|
45
|
-
export * from "./
|
|
98
|
+
export * from "./mapListBy";
|
|
99
|
+
export * from "./matchSorter";
|
|
100
|
+
export * from "./mergeObjects";
|
|
101
|
+
export * from "./mergeUrlQueryParams";
|
|
102
|
+
export * from "./navigateToHashParams";
|
|
103
|
+
export * from "./navigateToMergedHashParams";
|
|
104
|
+
export * from "./navigateToMergedParams";
|
|
105
|
+
export * from "./navigateToParams";
|
|
106
|
+
export * from "./navigateWithoutUrlParam";
|
|
107
|
+
export * from "./normaliseUrlPathname";
|
|
108
|
+
export * from "./normaliseUrl";
|
|
109
|
+
export * from "./pageview";
|
|
110
|
+
export * from "./parseCookie";
|
|
111
|
+
export * from "./parseURL";
|
|
112
|
+
export * from "./randomInt";
|
|
113
|
+
export * from "./randomKey";
|
|
114
|
+
export * from "./readCookie";
|
|
115
|
+
export * from "./redirectTo";
|
|
116
|
+
export * from "./removeAccents";
|
|
117
|
+
export * from "./removeCookie";
|
|
118
|
+
export * from "./removeDuplicatesByKey";
|
|
119
|
+
export * from "./removeDuplicatesComparing";
|
|
120
|
+
export * from "./removeIndexesFromArray";
|
|
121
|
+
export * from "./removeTrailingSlash";
|
|
122
|
+
export * from "./roundTo";
|
|
123
|
+
export * from "./serializeCookie";
|
|
124
|
+
export * from "./setCookie";
|
|
125
|
+
export * from "./shuffle";
|
|
126
|
+
export * from "./slugify";
|
|
127
|
+
export * from "./swapMap";
|
|
128
|
+
export * from "./titleCase";
|
|
129
|
+
export * from "./toNumber";
|
|
130
|
+
export * from "./toRgba";
|
|
131
|
+
export * from "./transformToUrlPathname";
|
|
132
|
+
export * from "./truncate";
|
|
46
133
|
export * from "./uid";
|
|
134
|
+
export * from "./updateLinkParams";
|
|
135
|
+
export * from "./updateUrlQueryParams";
|
|
136
|
+
export * from "./uuid";
|
|
137
|
+
export * from "./wait";
|
|
138
|
+
export * from "./whitelistObject";
|
package/isAnyObject.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type PlainObject } 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 declare function isAnyObject(payload: any): payload is PlainObject;
|
|
8
|
+
export default isAnyObject;
|
package/isAnyObject.js
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.d.ts
ADDED
package/isArray.js
ADDED
package/isBlob.d.ts
ADDED
package/isBlob.js
ADDED
package/isBoolean.d.ts
ADDED
package/isBoolean.js
ADDED
package/isBrowser.d.ts
ADDED
package/{ssr.js → isBrowser.js}
RENAMED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// import { isUndefined } from "./is";
|
|
2
|
+
/**
|
|
3
|
+
* @category ssr
|
|
4
|
+
* @category is
|
|
5
|
+
*/
|
|
2
6
|
export var isBrowser = typeof window !== "undefined";
|
|
3
7
|
// export const isBrowser = () => !isUndefined(window);
|
|
4
|
-
export
|
|
5
|
-
// export const isServer = () => isUndefined(window);
|
|
8
|
+
export default isBrowser;
|
package/isDate.d.ts
ADDED
package/isDate.js
ADDED
package/isEmptyArray.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
|
|
3
|
+
*
|
|
4
|
+
* @category is
|
|
5
|
+
*/
|
|
6
|
+
export declare function isEmptyObject(payload: any): payload is {
|
|
7
|
+
[K in any]: never;
|
|
8
|
+
};
|
|
9
|
+
export default isEmptyObject;
|
package/isEmptyObject.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import isPlainObject from "./isPlainObject";
|
|
2
|
+
/**
|
|
3
|
+
* Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
|
|
4
|
+
*
|
|
5
|
+
* @category is
|
|
6
|
+
*/
|
|
7
|
+
export function isEmptyObject(payload) {
|
|
8
|
+
return isPlainObject(payload) && Object.keys(payload).length === 0;
|
|
9
|
+
}
|
|
10
|
+
export default isEmptyObject;
|
package/isEmptyString.js
ADDED
package/isError.d.ts
ADDED
package/isError.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Is external url compared to the given current URL (if not provided it falls
|
|
3
|
+
* back to `location.href`)
|
|
4
|
+
*
|
|
5
|
+
* @category location
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export declare function isExternalUrl(url: string, currentUrl?: string): boolean;
|
|
9
|
+
export default isExternalUrl;
|
package/isExternalUrl.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import isBrowser from "./isBrowser";
|
|
2
|
+
/**
|
|
3
|
+
* Is external url compared to the given current URL (if not provided it falls
|
|
4
|
+
* back to `location.href`)
|
|
5
|
+
*
|
|
6
|
+
* @category location
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
export function isExternalUrl(url, currentUrl) {
|
|
10
|
+
var _a;
|
|
11
|
+
var reg = /https?:\/\/((?:[\w\d-]+\.)+[\w\d]{2,})/i;
|
|
12
|
+
var urlMatches = reg.exec(url);
|
|
13
|
+
// if no matches are found it means we either have an invalid URL, a relative
|
|
14
|
+
// URL or a hash link, and those are not considered externals
|
|
15
|
+
if (!urlMatches) {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
currentUrl = currentUrl || isBrowser ? location.href : "";
|
|
19
|
+
return currentUrl ? ((_a = reg.exec(currentUrl)) === null || _a === void 0 ? void 0 : _a[1]) !== urlMatches[1] : true;
|
|
20
|
+
}
|
|
21
|
+
export default isExternalUrl;
|
package/isFile.d.ts
ADDED
package/isFile.js
ADDED
package/isFloat.d.ts
ADDED
package/isFloat.js
ADDED
package/isFormData.d.ts
ADDED
package/isFormData.js
ADDED
package/isFullArray.d.ts
ADDED
package/isFullArray.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type PlainObject } from "./getType";
|
|
2
|
+
/**
|
|
3
|
+
* Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
|
|
4
|
+
*
|
|
5
|
+
* @category is
|
|
6
|
+
*/
|
|
7
|
+
export declare function isFullObject(payload: any): payload is PlainObject;
|
|
8
|
+
export default isFullObject;
|
package/isFullObject.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import isPlainObject from "./isPlainObject";
|
|
2
|
+
/**
|
|
3
|
+
* Returns whether the payload is a an empty object (excluding special classes or objects with other prototypes)
|
|
4
|
+
*
|
|
5
|
+
* @category is
|
|
6
|
+
*/
|
|
7
|
+
export function isFullObject(payload) {
|
|
8
|
+
return isPlainObject(payload) && Object.keys(payload).length > 0;
|
|
9
|
+
}
|
|
10
|
+
export default isFullObject;
|
package/isFullString.js
ADDED
package/isFunction.d.ts
ADDED
package/isFunction.js
ADDED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
3
|
-
|
|
4
|
-
export declare function isMobile(ssrValue?: boolean): boolean;
|
|
5
|
-
/**
|
|
2
|
+
* @category detect
|
|
3
|
+
* @category is
|
|
6
4
|
* @see https://stackoverflow.com/a/21712356/12285349
|
|
7
5
|
*/
|
|
8
6
|
export declare function isIE(ssrValue?: boolean): boolean;
|
|
7
|
+
export default isIE;
|