@stryke/helpers 0.10.13 → 0.10.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/deep-clone.cjs +3 -5
  3. package/dist/deep-clone.mjs +1 -3
  4. package/dist/deep-clone.mjs.map +1 -1
  5. package/dist/deep-merge.cjs +6 -6
  6. package/dist/deep-merge.mjs +3 -3
  7. package/dist/filter-empty.cjs +2 -2
  8. package/dist/filter-empty.mjs +1 -1
  9. package/dist/flatten-object.cjs +2 -3
  10. package/dist/flatten-object.d.cts +1 -1
  11. package/dist/flatten-object.d.mts +1 -1
  12. package/dist/flatten-object.mjs +1 -2
  13. package/dist/flatten-object.mjs.map +1 -1
  14. package/dist/get-field.cjs +4 -7
  15. package/dist/get-field.mjs +2 -5
  16. package/dist/get-field.mjs.map +1 -1
  17. package/dist/is-equal.cjs +4 -4
  18. package/dist/is-equal.mjs +2 -2
  19. package/dist/set-field.cjs +4 -4
  20. package/dist/set-field.d.cts +1 -1
  21. package/dist/set-field.d.mts +1 -1
  22. package/dist/set-field.mjs +2 -2
  23. package/dist/to-deep-key.cjs +4 -4
  24. package/dist/to-deep-key.mjs +2 -2
  25. package/dist/unflatten-object.d.cts +1 -1
  26. package/dist/unflatten-object.d.mts +1 -1
  27. package/package.json +7 -118
  28. package/dist/convert/src/index.cjs +0 -5
  29. package/dist/convert/src/index.mjs +0 -7
  30. package/dist/convert/src/parse-type-definition.cjs +0 -1
  31. package/dist/convert/src/parse-type-definition.mjs +0 -3
  32. package/dist/convert/src/string-to-utf8-array.cjs +0 -5
  33. package/dist/convert/src/string-to-utf8-array.mjs +0 -6
  34. package/dist/convert/src/string-to-utf8-array.mjs.map +0 -1
  35. package/dist/convert/src/to-bool.cjs +0 -1
  36. package/dist/convert/src/to-bool.mjs +0 -3
  37. package/dist/convert/src/to-string-key.cjs +0 -15
  38. package/dist/convert/src/to-string-key.mjs +0 -15
  39. package/dist/convert/src/to-string-key.mjs.map +0 -1
  40. package/dist/convert/src/utf8-array-to-string.cjs +0 -5
  41. package/dist/convert/src/utf8-array-to-string.mjs +0 -6
  42. package/dist/convert/src/utf8-array-to-string.mjs.map +0 -1
  43. package/dist/type-checks/src/get-object-tag.cjs +0 -15
  44. package/dist/type-checks/src/get-object-tag.mjs +0 -15
  45. package/dist/type-checks/src/get-object-tag.mjs.map +0 -1
  46. package/dist/type-checks/src/index.cjs +0 -21
  47. package/dist/type-checks/src/index.mjs +0 -23
  48. package/dist/type-checks/src/is-buffer.cjs +0 -13
  49. package/dist/type-checks/src/is-buffer.mjs +0 -14
  50. package/dist/type-checks/src/is-buffer.mjs.map +0 -1
  51. package/dist/type-checks/src/is-collection.cjs +0 -1
  52. package/dist/type-checks/src/is-collection.mjs +0 -3
  53. package/dist/type-checks/src/is-deep-key.cjs +0 -29
  54. package/dist/type-checks/src/is-deep-key.mjs +0 -29
  55. package/dist/type-checks/src/is-deep-key.mjs.map +0 -1
  56. package/dist/type-checks/src/is-empty.cjs +0 -20
  57. package/dist/type-checks/src/is-empty.mjs +0 -21
  58. package/dist/type-checks/src/is-empty.mjs.map +0 -1
  59. package/dist/type-checks/src/is-function.cjs +0 -27
  60. package/dist/type-checks/src/is-function.mjs +0 -26
  61. package/dist/type-checks/src/is-function.mjs.map +0 -1
  62. package/dist/type-checks/src/is-mergeable-object.cjs +0 -14
  63. package/dist/type-checks/src/is-mergeable-object.mjs +0 -15
  64. package/dist/type-checks/src/is-mergeable-object.mjs.map +0 -1
  65. package/dist/type-checks/src/is-non-null-object.cjs +0 -16
  66. package/dist/type-checks/src/is-non-null-object.mjs +0 -17
  67. package/dist/type-checks/src/is-non-null-object.mjs.map +0 -1
  68. package/dist/type-checks/src/is-null.cjs +0 -12
  69. package/dist/type-checks/src/is-null.mjs +0 -12
  70. package/dist/type-checks/src/is-null.mjs.map +0 -1
  71. package/dist/type-checks/src/is-number.cjs +0 -18
  72. package/dist/type-checks/src/is-number.mjs +0 -18
  73. package/dist/type-checks/src/is-number.mjs.map +0 -1
  74. package/dist/type-checks/src/is-object-index.cjs +0 -20
  75. package/dist/type-checks/src/is-object-index.mjs +0 -20
  76. package/dist/type-checks/src/is-object-index.mjs.map +0 -1
  77. package/dist/type-checks/src/is-object.cjs +0 -19
  78. package/dist/type-checks/src/is-object.mjs +0 -20
  79. package/dist/type-checks/src/is-object.mjs.map +0 -1
  80. package/dist/type-checks/src/is-plain-object.cjs +0 -64
  81. package/dist/type-checks/src/is-plain-object.mjs +0 -64
  82. package/dist/type-checks/src/is-plain-object.mjs.map +0 -1
  83. package/dist/type-checks/src/is-primitive.cjs +0 -12
  84. package/dist/type-checks/src/is-primitive.mjs +0 -12
  85. package/dist/type-checks/src/is-primitive.mjs.map +0 -1
  86. package/dist/type-checks/src/is-react-element.cjs +0 -8
  87. package/dist/type-checks/src/is-react-element.mjs +0 -8
  88. package/dist/type-checks/src/is-react-element.mjs.map +0 -1
  89. package/dist/type-checks/src/is-set-string.cjs +0 -20
  90. package/dist/type-checks/src/is-set-string.mjs +0 -21
  91. package/dist/type-checks/src/is-set-string.mjs.map +0 -1
  92. package/dist/type-checks/src/is-set.cjs +0 -19
  93. package/dist/type-checks/src/is-set.mjs +0 -20
  94. package/dist/type-checks/src/is-set.mjs.map +0 -1
  95. package/dist/type-checks/src/is-string.cjs +0 -12
  96. package/dist/type-checks/src/is-string.mjs +0 -12
  97. package/dist/type-checks/src/is-string.mjs.map +0 -1
  98. package/dist/type-checks/src/is-typed-array.cjs +0 -8
  99. package/dist/type-checks/src/is-typed-array.mjs +0 -8
  100. package/dist/type-checks/src/is-typed-array.mjs.map +0 -1
  101. package/dist/type-checks/src/is-undefined.cjs +0 -8
  102. package/dist/type-checks/src/is-undefined.mjs +0 -8
  103. package/dist/type-checks/src/is-undefined.mjs.map +0 -1
  104. package/dist/type-checks/src/property-exists.cjs +0 -31
  105. package/dist/type-checks/src/property-exists.mjs +0 -31
  106. package/dist/type-checks/src/property-exists.mjs.map +0 -1
  107. package/dist/type-checks/src/type-detect.cjs +0 -15
  108. package/dist/type-checks/src/type-detect.mjs +0 -17
  109. package/dist/type-checks/src/type-detect.mjs.map +0 -1
  110. package/dist/types/src/base.d.cts +0 -7
  111. package/dist/types/src/base.d.cts.map +0 -1
  112. package/dist/types/src/base.d.mts +0 -7
  113. package/dist/types/src/base.d.mts.map +0 -1
  114. package/dist/types/src/json.d.cts +0 -27
  115. package/dist/types/src/json.d.cts.map +0 -1
  116. package/dist/types/src/json.d.mts +0 -27
  117. package/dist/types/src/json.d.mts.map +0 -1
  118. package/dist/types/src/object.d.cts +0 -124
  119. package/dist/types/src/object.d.cts.map +0 -1
  120. package/dist/types/src/object.d.mts +0 -124
  121. package/dist/types/src/object.d.mts.map +0 -1
  122. package/dist/types/src/string.d.cts +0 -5
  123. package/dist/types/src/string.d.cts.map +0 -1
  124. package/dist/types/src/string.d.mts +0 -5
  125. package/dist/types/src/string.d.mts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stryke/helpers",
3
- "version": "0.10.13",
3
+ "version": "0.10.14",
4
4
  "private": false,
5
5
  "description": "A package containing miscellaneous helper functions that are used across many different Storm Software projects.",
6
6
  "repository": {
@@ -15,30 +15,6 @@
15
15
  "import": "./dist/arg-identity.mjs",
16
16
  "require": "./dist/arg-identity.cjs"
17
17
  },
18
- "./convert/src": {
19
- "import": "./dist/convert/src/index.mjs",
20
- "require": "./dist/convert/src/index.cjs"
21
- },
22
- "./convert/src/parse-type-definition": {
23
- "import": "./dist/convert/src/parse-type-definition.mjs",
24
- "require": "./dist/convert/src/parse-type-definition.cjs"
25
- },
26
- "./convert/src/string-to-utf8-array": {
27
- "import": "./dist/convert/src/string-to-utf8-array.mjs",
28
- "require": "./dist/convert/src/string-to-utf8-array.cjs"
29
- },
30
- "./convert/src/to-bool": {
31
- "import": "./dist/convert/src/to-bool.mjs",
32
- "require": "./dist/convert/src/to-bool.cjs"
33
- },
34
- "./convert/src/to-string-key": {
35
- "import": "./dist/convert/src/to-string-key.mjs",
36
- "require": "./dist/convert/src/to-string-key.cjs"
37
- },
38
- "./convert/src/utf8-array-to-string": {
39
- "import": "./dist/convert/src/utf8-array-to-string.mjs",
40
- "require": "./dist/convert/src/utf8-array-to-string.cjs"
41
- },
42
18
  "./deep-clone": {
43
19
  "import": "./dist/deep-clone.mjs",
44
20
  "require": "./dist/deep-clone.cjs"
@@ -110,98 +86,6 @@
110
86
  "import": "./dist/to-path.mjs",
111
87
  "require": "./dist/to-path.cjs"
112
88
  },
113
- "./type-checks/src": {
114
- "import": "./dist/type-checks/src/index.mjs",
115
- "require": "./dist/type-checks/src/index.cjs"
116
- },
117
- "./type-checks/src/get-object-tag": {
118
- "import": "./dist/type-checks/src/get-object-tag.mjs",
119
- "require": "./dist/type-checks/src/get-object-tag.cjs"
120
- },
121
- "./type-checks/src/is-buffer": {
122
- "import": "./dist/type-checks/src/is-buffer.mjs",
123
- "require": "./dist/type-checks/src/is-buffer.cjs"
124
- },
125
- "./type-checks/src/is-collection": {
126
- "import": "./dist/type-checks/src/is-collection.mjs",
127
- "require": "./dist/type-checks/src/is-collection.cjs"
128
- },
129
- "./type-checks/src/is-deep-key": {
130
- "import": "./dist/type-checks/src/is-deep-key.mjs",
131
- "require": "./dist/type-checks/src/is-deep-key.cjs"
132
- },
133
- "./type-checks/src/is-empty": {
134
- "import": "./dist/type-checks/src/is-empty.mjs",
135
- "require": "./dist/type-checks/src/is-empty.cjs"
136
- },
137
- "./type-checks/src/is-function": {
138
- "import": "./dist/type-checks/src/is-function.mjs",
139
- "require": "./dist/type-checks/src/is-function.cjs"
140
- },
141
- "./type-checks/src/is-mergeable-object": {
142
- "import": "./dist/type-checks/src/is-mergeable-object.mjs",
143
- "require": "./dist/type-checks/src/is-mergeable-object.cjs"
144
- },
145
- "./type-checks/src/is-non-null-object": {
146
- "import": "./dist/type-checks/src/is-non-null-object.mjs",
147
- "require": "./dist/type-checks/src/is-non-null-object.cjs"
148
- },
149
- "./type-checks/src/is-null": {
150
- "import": "./dist/type-checks/src/is-null.mjs",
151
- "require": "./dist/type-checks/src/is-null.cjs"
152
- },
153
- "./type-checks/src/is-number": {
154
- "import": "./dist/type-checks/src/is-number.mjs",
155
- "require": "./dist/type-checks/src/is-number.cjs"
156
- },
157
- "./type-checks/src/is-object": {
158
- "import": "./dist/type-checks/src/is-object.mjs",
159
- "require": "./dist/type-checks/src/is-object.cjs"
160
- },
161
- "./type-checks/src/is-object-index": {
162
- "import": "./dist/type-checks/src/is-object-index.mjs",
163
- "require": "./dist/type-checks/src/is-object-index.cjs"
164
- },
165
- "./type-checks/src/is-plain-object": {
166
- "import": "./dist/type-checks/src/is-plain-object.mjs",
167
- "require": "./dist/type-checks/src/is-plain-object.cjs"
168
- },
169
- "./type-checks/src/is-primitive": {
170
- "import": "./dist/type-checks/src/is-primitive.mjs",
171
- "require": "./dist/type-checks/src/is-primitive.cjs"
172
- },
173
- "./type-checks/src/is-react-element": {
174
- "import": "./dist/type-checks/src/is-react-element.mjs",
175
- "require": "./dist/type-checks/src/is-react-element.cjs"
176
- },
177
- "./type-checks/src/is-set": {
178
- "import": "./dist/type-checks/src/is-set.mjs",
179
- "require": "./dist/type-checks/src/is-set.cjs"
180
- },
181
- "./type-checks/src/is-set-string": {
182
- "import": "./dist/type-checks/src/is-set-string.mjs",
183
- "require": "./dist/type-checks/src/is-set-string.cjs"
184
- },
185
- "./type-checks/src/is-string": {
186
- "import": "./dist/type-checks/src/is-string.mjs",
187
- "require": "./dist/type-checks/src/is-string.cjs"
188
- },
189
- "./type-checks/src/is-typed-array": {
190
- "import": "./dist/type-checks/src/is-typed-array.mjs",
191
- "require": "./dist/type-checks/src/is-typed-array.cjs"
192
- },
193
- "./type-checks/src/is-undefined": {
194
- "import": "./dist/type-checks/src/is-undefined.mjs",
195
- "require": "./dist/type-checks/src/is-undefined.cjs"
196
- },
197
- "./type-checks/src/property-exists": {
198
- "import": "./dist/type-checks/src/property-exists.mjs",
199
- "require": "./dist/type-checks/src/property-exists.cjs"
200
- },
201
- "./type-checks/src/type-detect": {
202
- "import": "./dist/type-checks/src/type-detect.mjs",
203
- "require": "./dist/type-checks/src/type-detect.cjs"
204
- },
205
89
  "./unflatten-object": {
206
90
  "import": "./dist/unflatten-object.mjs",
207
91
  "require": "./dist/unflatten-object.cjs"
@@ -212,7 +96,12 @@
212
96
  "main": "./dist/index.cjs",
213
97
  "module": "./dist/index.mjs",
214
98
  "types": "./dist/index.d.cts",
99
+ "dependencies": {
100
+ "@stryke/convert": "^0.7.5",
101
+ "@stryke/type-checks": "^0.6.7",
102
+ "@stryke/types": "^0.12.2"
103
+ },
215
104
  "devDependencies": { "tsdown": "^0.21.10" },
216
105
  "publishConfig": { "access": "public" },
217
- "gitHead": "b6886b6200909e934012026a76709bfeb90176dd"
106
+ "gitHead": "2ed697a18e476a0415c784f7e12e46770ea397e0"
218
107
  }
@@ -1,5 +0,0 @@
1
- require('./parse-type-definition.cjs');
2
- require('./string-to-utf8-array.cjs');
3
- require('./to-bool.cjs');
4
- const require_to_string_key = require('./to-string-key.cjs');
5
- require('./utf8-array-to-string.cjs');
@@ -1,7 +0,0 @@
1
- import "./parse-type-definition.mjs";
2
- import "./string-to-utf8-array.mjs";
3
- import "./to-bool.mjs";
4
- import { toStringKey } from "./to-string-key.mjs";
5
- import "./utf8-array-to-string.mjs";
6
-
7
- export { };
@@ -1 +0,0 @@
1
- require('../../type-checks/src/index.cjs');
@@ -1,3 +0,0 @@
1
- import "../../type-checks/src/index.mjs";
2
-
3
- export { };
@@ -1,5 +0,0 @@
1
-
2
- //#region ../convert/src/string-to-utf8-array.ts
3
- const encoder = new TextEncoder();
4
-
5
- //#endregion
@@ -1,6 +0,0 @@
1
- //#region ../convert/src/string-to-utf8-array.ts
2
- const encoder = new TextEncoder();
3
-
4
- //#endregion
5
- export { };
6
- //# sourceMappingURL=string-to-utf8-array.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"string-to-utf8-array.mjs","names":[],"sources":["../../../../convert/src/string-to-utf8-array.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nconst encoder = new TextEncoder();\n\n/**\n * Convert a string to a utf-8 array\n *\n * @param input - The string to convert\n * @returns The converted utf-8 array\n */\nexport function stringToUtf8Array(input: string): Uint8Array {\n return encoder.encode(input);\n}\n"],"mappings":";AAkBA,MAAM,UAAU,IAAI,aAAa"}
@@ -1 +0,0 @@
1
- require('../../type-checks/src/index.cjs');
@@ -1,3 +0,0 @@
1
- import "../../type-checks/src/index.mjs";
2
-
3
- export { };
@@ -1,15 +0,0 @@
1
-
2
- //#region ../convert/src/to-string-key.ts
3
- /**
4
- * Converts `value` to a string key if it's not a string or symbol.
5
- *
6
- * @param value - The value to inspect.
7
- * @returns Returns the key.
8
- */
9
- function toStringKey(value) {
10
- if (Object.is(value, -0)) return "-0";
11
- return value.toString();
12
- }
13
-
14
- //#endregion
15
- exports.toStringKey = toStringKey;
@@ -1,15 +0,0 @@
1
- //#region ../convert/src/to-string-key.ts
2
- /**
3
- * Converts `value` to a string key if it's not a string or symbol.
4
- *
5
- * @param value - The value to inspect.
6
- * @returns Returns the key.
7
- */
8
- function toStringKey(value) {
9
- if (Object.is(value, -0)) return "-0";
10
- return value.toString();
11
- }
12
-
13
- //#endregion
14
- export { toStringKey };
15
- //# sourceMappingURL=to-string-key.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"to-string-key.mjs","names":[],"sources":["../../../../convert/src/to-string-key.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @param value - The value to inspect.\n * @returns Returns the key.\n */\nexport function toStringKey(value: number): string | symbol {\n if (Object.is(value, -0)) {\n return \"-0\";\n }\n\n return value.toString();\n}\n"],"mappings":";;;;;;;AAwBA,SAAgB,YAAY,OAAgC;AAC1D,KAAI,OAAO,GAAG,OAAO,GAAG,CACtB,QAAO;AAGT,QAAO,MAAM,UAAU"}
@@ -1,5 +0,0 @@
1
-
2
- //#region ../convert/src/utf8-array-to-string.ts
3
- const decoder = new TextDecoder();
4
-
5
- //#endregion
@@ -1,6 +0,0 @@
1
- //#region ../convert/src/utf8-array-to-string.ts
2
- const decoder = new TextDecoder();
3
-
4
- //#endregion
5
- export { };
6
- //# sourceMappingURL=utf8-array-to-string.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utf8-array-to-string.mjs","names":[],"sources":["../../../../convert/src/utf8-array-to-string.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nconst decoder = new TextDecoder();\n\n/**\n * Convert a utf-8 array to string\n *\n * @param input - Utf-8 Array\n * @returns The converted string\n */\nexport function utf8ArrayToString(\n input: NodeJS.ArrayBufferView | ArrayBuffer\n): string {\n return decoder.decode(input);\n}\n"],"mappings":";AAkBA,MAAM,UAAU,IAAI,aAAa"}
@@ -1,15 +0,0 @@
1
-
2
- //#region ../type-checks/src/get-object-tag.ts
3
- /**
4
- * Gets the `toStringTag` of `obj`.
5
- *
6
- * @param value - The obj to query.
7
- * @returns Returns the `toStringTag`.
8
- */
9
- const getObjectTag = (value) => {
10
- if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
11
- return Object.prototype.toString.call(value);
12
- };
13
-
14
- //#endregion
15
- exports.getObjectTag = getObjectTag;
@@ -1,15 +0,0 @@
1
- //#region ../type-checks/src/get-object-tag.ts
2
- /**
3
- * Gets the `toStringTag` of `obj`.
4
- *
5
- * @param value - The obj to query.
6
- * @returns Returns the `toStringTag`.
7
- */
8
- const getObjectTag = (value) => {
9
- if (value == null) return value === void 0 ? "[object Undefined]" : "[object Null]";
10
- return Object.prototype.toString.call(value);
11
- };
12
-
13
- //#endregion
14
- export { getObjectTag };
15
- //# sourceMappingURL=get-object-tag.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-object-tag.mjs","names":[],"sources":["../../../../type-checks/src/get-object-tag.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\n/**\n * Gets the `toStringTag` of `obj`.\n *\n * @param value - The obj to query.\n * @returns Returns the `toStringTag`.\n */\nexport const getObjectTag = (value: unknown): string => {\n if (value == null) {\n return value === undefined ? \"[object Undefined]\" : \"[object Null]\";\n }\n return Object.prototype.toString.call(value);\n};\n"],"mappings":";;;;;;;AAwBA,MAAa,gBAAgB,UAA2B;AACtD,KAAI,SAAS,KACX,QAAO,UAAU,SAAY,uBAAuB;AAEtD,QAAO,OAAO,UAAU,SAAS,KAAK,MAAM"}
@@ -1,21 +0,0 @@
1
- const require_get_object_tag = require('./get-object-tag.cjs');
2
- const require_is_plain_object = require('./is-plain-object.cjs');
3
- const require_is_function = require('./is-function.cjs');
4
- const require_is_null = require('./is-null.cjs');
5
- const require_is_number = require('./is-number.cjs');
6
- const require_is_undefined = require('./is-undefined.cjs');
7
- const require_is_empty = require('./is-empty.cjs');
8
- const require_is_object = require('./is-object.cjs');
9
- const require_is_buffer = require('./is-buffer.cjs');
10
- require('./type-detect.cjs');
11
- require('./is-collection.cjs');
12
- const require_is_deep_key = require('./is-deep-key.cjs');
13
- const require_is_string = require('./is-string.cjs');
14
- const require_is_set = require('./is-set.cjs');
15
- const require_is_set_string = require('./is-set-string.cjs');
16
- const require_is_react_element = require('./is-react-element.cjs');
17
- const require_is_mergeable_object = require('./is-mergeable-object.cjs');
18
- const require_is_object_index = require('./is-object-index.cjs');
19
- const require_is_primitive = require('./is-primitive.cjs');
20
- const require_is_typed_array = require('./is-typed-array.cjs');
21
- const require_property_exists = require('./property-exists.cjs');
@@ -1,23 +0,0 @@
1
- import { getObjectTag } from "./get-object-tag.mjs";
2
- import { isObjectLike, isPlainObject } from "./is-plain-object.mjs";
3
- import { isAsyncFunction, isFunction, isSyncFunction } from "./is-function.mjs";
4
- import { isNull } from "./is-null.mjs";
5
- import { isNumber } from "./is-number.mjs";
6
- import { isUndefined } from "./is-undefined.mjs";
7
- import { isEmpty } from "./is-empty.mjs";
8
- import { isObject } from "./is-object.mjs";
9
- import { isBufferExists } from "./is-buffer.mjs";
10
- import "./type-detect.mjs";
11
- import "./is-collection.mjs";
12
- import { isDeepKey } from "./is-deep-key.mjs";
13
- import { isString } from "./is-string.mjs";
14
- import { isSet } from "./is-set.mjs";
15
- import { isSetString } from "./is-set-string.mjs";
16
- import { isReactElement } from "./is-react-element.mjs";
17
- import { isMergeableObject } from "./is-mergeable-object.mjs";
18
- import { isObjectIndex } from "./is-object-index.mjs";
19
- import { isPrimitive } from "./is-primitive.mjs";
20
- import { isTypedArray } from "./is-typed-array.mjs";
21
- import { propertyExists, propertyUnsafe } from "./property-exists.mjs";
22
-
23
- export { };
@@ -1,13 +0,0 @@
1
- let node_buffer = require("node:buffer");
2
-
3
- //#region ../type-checks/src/is-buffer.ts
4
- const isBufferExists = typeof node_buffer.Buffer !== "undefined";
5
- /**
6
- * Check if the provided value's type is `Buffer`
7
- */
8
- const isBuffer = isBufferExists ? node_buffer.Buffer.isBuffer.bind(node_buffer.Buffer) : function isBuffer(_) {
9
- return false;
10
- };
11
-
12
- //#endregion
13
- exports.isBufferExists = isBufferExists;
@@ -1,14 +0,0 @@
1
- import { Buffer } from "node:buffer";
2
-
3
- //#region ../type-checks/src/is-buffer.ts
4
- const isBufferExists = typeof Buffer !== "undefined";
5
- /**
6
- * Check if the provided value's type is `Buffer`
7
- */
8
- const isBuffer = isBufferExists ? Buffer.isBuffer.bind(Buffer) : function isBuffer(_) {
9
- return false;
10
- };
11
-
12
- //#endregion
13
- export { isBufferExists };
14
- //# sourceMappingURL=is-buffer.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-buffer.mjs","names":[],"sources":["../../../../type-checks/src/is-buffer.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { Buffer } from \"node:buffer\";\n\nexport const isBufferExists = typeof Buffer !== \"undefined\";\n\n/**\n * Check if the provided value's type is `Buffer`\n */\nexport const isBuffer: typeof Buffer.isBuffer = isBufferExists\n ? Buffer.isBuffer.bind(Buffer)\n : /**\n * Check if the provided value's type is `Buffer`\n\n * @param _ - The value to type check\n * @returns An indicator specifying if the value provided is of type `Buffer`\n */\n function isBuffer(_: Parameters<typeof Buffer.isBuffer>[0]): _ is Buffer {\n return false;\n };\n"],"mappings":";;;AAoBA,MAAa,iBAAiB,OAAO,WAAW;;;;AAKhD,MAAa,WAAmC,iBAC5C,OAAO,SAAS,KAAK,OAAO,GAO5B,SAAS,SAAS,GAAuD;AACvE,QAAO"}
@@ -1 +0,0 @@
1
- require('./type-detect.cjs');
@@ -1,3 +0,0 @@
1
- import "./type-detect.mjs";
2
-
3
- export { };
@@ -1,29 +0,0 @@
1
-
2
- //#region ../type-checks/src/is-deep-key.ts
3
- /**
4
- * Checks if a given key is a deep key.
5
- *
6
- * A deep key is a string that contains a dot (.) or square brackets with a property accessor.
7
- *
8
- * @example
9
- * isDeepKey('a.b') // true
10
- * isDeepKey('a[b]') // true
11
- * isDeepKey('a') // false
12
- * isDeepKey(123) // false
13
- * isDeepKey('a.b.c') // true
14
- * isDeepKey('a[b][c]') // true
15
- *
16
- * @param key - The key to check.
17
- * @returns Returns true if the key is a deep key, otherwise false.
18
- */
19
- function isDeepKey(key) {
20
- switch (typeof key) {
21
- case "number":
22
- case "symbol": return false;
23
- case "string": return key.includes(".") || key.includes("[") || key.includes("]");
24
- default: return false;
25
- }
26
- }
27
-
28
- //#endregion
29
- exports.isDeepKey = isDeepKey;
@@ -1,29 +0,0 @@
1
- //#region ../type-checks/src/is-deep-key.ts
2
- /**
3
- * Checks if a given key is a deep key.
4
- *
5
- * A deep key is a string that contains a dot (.) or square brackets with a property accessor.
6
- *
7
- * @example
8
- * isDeepKey('a.b') // true
9
- * isDeepKey('a[b]') // true
10
- * isDeepKey('a') // false
11
- * isDeepKey(123) // false
12
- * isDeepKey('a.b.c') // true
13
- * isDeepKey('a[b][c]') // true
14
- *
15
- * @param key - The key to check.
16
- * @returns Returns true if the key is a deep key, otherwise false.
17
- */
18
- function isDeepKey(key) {
19
- switch (typeof key) {
20
- case "number":
21
- case "symbol": return false;
22
- case "string": return key.includes(".") || key.includes("[") || key.includes("]");
23
- default: return false;
24
- }
25
- }
26
-
27
- //#endregion
28
- export { isDeepKey };
29
- //# sourceMappingURL=is-deep-key.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-deep-key.mjs","names":[],"sources":["../../../../type-checks/src/is-deep-key.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { DeepKey } from \"@stryke/types\";\n\n/**\n * Checks if a given key is a deep key.\n *\n * A deep key is a string that contains a dot (.) or square brackets with a property accessor.\n *\n * @example\n * isDeepKey('a.b') // true\n * isDeepKey('a[b]') // true\n * isDeepKey('a') // false\n * isDeepKey(123) // false\n * isDeepKey('a.b.c') // true\n * isDeepKey('a[b][c]') // true\n *\n * @param key - The key to check.\n * @returns Returns true if the key is a deep key, otherwise false.\n */\nexport function isDeepKey(key: PropertyKey): key is DeepKey<any> {\n switch (typeof key) {\n case \"number\":\n case \"symbol\": {\n return false;\n }\n case \"string\": {\n return key.includes(\".\") || key.includes(\"[\") || key.includes(\"]\");\n }\n case \"bigint\":\n case \"boolean\":\n case \"function\":\n case \"object\":\n case \"undefined\":\n default: {\n return false;\n }\n }\n}\n\n/**\n * Checks if a given key is a deep key or normal (shallow key).\n *\n * A deep key is a string that contains a dot (.) or square brackets with a property accessor.\n *\n * @example\n * isDeepKey('a.b') // true\n * isDeepKey('a[b]') // true\n * isDeepKey('a') // true\n * isDeepKey(123) // false\n * isDeepKey('a.b.c') // true\n * isDeepKey('a[b][c]') // true\n *\n * @param key - The key to check.\n * @returns Returns true if the key is a deep key, otherwise false.\n */\nexport function isKeyOrDeepKey(key: PropertyKey): key is DeepKey<any> {\n switch (typeof key) {\n case \"number\": {\n return true;\n }\n case \"symbol\": {\n return false;\n }\n case \"string\": {\n return true;\n }\n case \"bigint\":\n case \"boolean\":\n case \"function\":\n case \"object\":\n case \"undefined\":\n default: {\n return false;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAoCA,SAAgB,UAAU,KAAuC;AAC/D,SAAQ,OAAO,KAAf;EACE,KAAK;EACL,KAAK,SACH,QAAO;EAET,KAAK,SACH,QAAO,IAAI,SAAS,IAAI,IAAI,IAAI,SAAS,IAAI,IAAI,IAAI,SAAS,IAAI;EAOpE,QACE,QAAO"}
@@ -1,20 +0,0 @@
1
- const require_is_null = require('./is-null.cjs');
2
- const require_is_undefined = require('./is-undefined.cjs');
3
-
4
- //#region ../type-checks/src/is-empty.ts
5
- /**
6
- * Check if the provided value's type is `null` or `undefined`
7
- *
8
- * @param value - The value to type check
9
- * @returns An indicator specifying if the value provided is of type `null` or `undefined`
10
- */
11
- const isEmpty = (value) => {
12
- try {
13
- return require_is_undefined.isUndefined(value) || require_is_null.isNull(value);
14
- } catch {
15
- return false;
16
- }
17
- };
18
-
19
- //#endregion
20
- exports.isEmpty = isEmpty;
@@ -1,21 +0,0 @@
1
- import { isNull } from "./is-null.mjs";
2
- import { isUndefined } from "./is-undefined.mjs";
3
-
4
- //#region ../type-checks/src/is-empty.ts
5
- /**
6
- * Check if the provided value's type is `null` or `undefined`
7
- *
8
- * @param value - The value to type check
9
- * @returns An indicator specifying if the value provided is of type `null` or `undefined`
10
- */
11
- const isEmpty = (value) => {
12
- try {
13
- return isUndefined(value) || isNull(value);
14
- } catch {
15
- return false;
16
- }
17
- };
18
-
19
- //#endregion
20
- export { isEmpty };
21
- //# sourceMappingURL=is-empty.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-empty.mjs","names":[],"sources":["../../../../type-checks/src/is-empty.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isDate } from \"./is-date\";\nimport { isFunction } from \"./is-function\";\nimport { isNull } from \"./is-null\";\nimport { isNumber } from \"./is-number\";\nimport { isSymbol } from \"./is-symbol\";\nimport { isUndefined } from \"./is-undefined\";\n\n/**\n * Check if the provided value's type is `null` or `undefined`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `null` or `undefined`\n */\nexport const isEmpty = (value: unknown) => {\n try {\n return isUndefined(value) || isNull(value);\n } catch {\n return false;\n }\n};\n\nexport const isEmptyAnything = (value: any) => {\n if (value === true || value === false) return true;\n if (value === null || value === undefined) return true;\n if (isNumber(value)) return value === 0;\n if (isDate(value)) return Number.isNaN(value.getTime());\n if (isFunction(value)) return false;\n if (isSymbol(value)) return false;\n const { length } = value;\n if (isNumber(length)) return length === 0;\n const { size } = value;\n if (isNumber(size)) return size === 0;\n const keys = Object.keys(value).length;\n\n return keys === 0;\n};\n"],"mappings":";;;;;;;;;;AA+BA,MAAa,WAAW,UAAmB;AACzC,KAAI;AACF,SAAO,YAAY,MAAM,IAAI,OAAO,MAAM;SACpC;AACN,SAAO"}
@@ -1,27 +0,0 @@
1
- const require_get_object_tag = require('./get-object-tag.cjs');
2
-
3
- //#region ../type-checks/src/is-function.ts
4
- function isSyncFunction(value) {
5
- return require_get_object_tag.getObjectTag(value) === "[object Function]";
6
- }
7
- function isAsyncFunction(value) {
8
- return require_get_object_tag.getObjectTag(value) === "[object AsyncFunction]";
9
- }
10
- /**
11
- * Check if the provided value's type is `Function`
12
- *
13
- * @param value - The value to type check
14
- * @returns An indicator specifying if the value provided is of type `Function`
15
- */
16
- const isFunction = (value) => {
17
- try {
18
- return value instanceof Function || typeof value === "function" || Boolean(value?.constructor && value?.call && value?.apply) || isSyncFunction(value) || isAsyncFunction(value);
19
- } catch {
20
- return false;
21
- }
22
- };
23
-
24
- //#endregion
25
- exports.isAsyncFunction = isAsyncFunction;
26
- exports.isFunction = isFunction;
27
- exports.isSyncFunction = isSyncFunction;
@@ -1,26 +0,0 @@
1
- import { getObjectTag } from "./get-object-tag.mjs";
2
-
3
- //#region ../type-checks/src/is-function.ts
4
- function isSyncFunction(value) {
5
- return getObjectTag(value) === "[object Function]";
6
- }
7
- function isAsyncFunction(value) {
8
- return getObjectTag(value) === "[object AsyncFunction]";
9
- }
10
- /**
11
- * Check if the provided value's type is `Function`
12
- *
13
- * @param value - The value to type check
14
- * @returns An indicator specifying if the value provided is of type `Function`
15
- */
16
- const isFunction = (value) => {
17
- try {
18
- return value instanceof Function || typeof value === "function" || Boolean(value?.constructor && value?.call && value?.apply) || isSyncFunction(value) || isAsyncFunction(value);
19
- } catch {
20
- return false;
21
- }
22
- };
23
-
24
- //#endregion
25
- export { isAsyncFunction, isFunction, isSyncFunction };
26
- //# sourceMappingURL=is-function.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-function.mjs","names":[],"sources":["../../../../type-checks/src/is-function.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { AnyFunction } from \"@stryke/types/base\";\nimport { getObjectTag } from \"./get-object-tag\";\n\nexport function isSyncFunction(value?: any): value is AnyFunction {\n return getObjectTag(value) === \"[object Function]\";\n}\n\nexport function isAsyncFunction(value?: any): value is AnyFunction {\n return getObjectTag(value) === \"[object AsyncFunction]\";\n}\n\n/**\n * Check if the provided value's type is `Function`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Function`\n */\nexport const isFunction = (value: unknown): value is AnyFunction => {\n try {\n return (\n value instanceof Function ||\n typeof value === \"function\" ||\n Boolean(\n value?.constructor && (value as any)?.call && (value as any)?.apply\n ) ||\n isSyncFunction(value) ||\n isAsyncFunction(value)\n );\n } catch {\n return false;\n }\n};\n"],"mappings":";;;AAqBA,SAAgB,eAAe,OAAmC;AAChE,QAAO,aAAa,MAAM,KAAK;;AAGjC,SAAgB,gBAAgB,OAAmC;AACjE,QAAO,aAAa,MAAM,KAAK;;;;;;;;AASjC,MAAa,cAAc,UAAyC;AAClE,KAAI;AACF,SACE,iBAAiB,YACjB,OAAO,UAAU,cACjB,QACE,OAAO,eAAgB,OAAe,QAAS,OAAe,MAC/D,IACD,eAAe,MAAM,IACrB,gBAAgB,MAAM;SAElB;AACN,SAAO"}
@@ -1,14 +0,0 @@
1
- const require_is_non_null_object = require('./is-non-null-object.cjs');
2
- const require_is_react_element = require('./is-react-element.cjs');
3
-
4
- //#region ../type-checks/src/is-mergeable-object.ts
5
- const isSpecialType = (value) => {
6
- const stringValue = Object.prototype.toString.call(value);
7
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || require_is_react_element.isReactElement(value);
8
- };
9
- const isMergeableObject = (value) => {
10
- return require_is_non_null_object.isNonNullObject(value) && !isSpecialType(value);
11
- };
12
-
13
- //#endregion
14
- exports.isMergeableObject = isMergeableObject;
@@ -1,15 +0,0 @@
1
- import { isNonNullObject } from "./is-non-null-object.mjs";
2
- import { isReactElement } from "./is-react-element.mjs";
3
-
4
- //#region ../type-checks/src/is-mergeable-object.ts
5
- const isSpecialType = (value) => {
6
- const stringValue = Object.prototype.toString.call(value);
7
- return stringValue === "[object RegExp]" || stringValue === "[object Date]" || isReactElement(value);
8
- };
9
- const isMergeableObject = (value) => {
10
- return isNonNullObject(value) && !isSpecialType(value);
11
- };
12
-
13
- //#endregion
14
- export { isMergeableObject };
15
- //# sourceMappingURL=is-mergeable-object.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"is-mergeable-object.mjs","names":[],"sources":["../../../../type-checks/src/is-mergeable-object.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isNonNullObject } from \"./is-non-null-object\";\nimport { isReactElement } from \"./is-react-element\";\n\nconst isSpecialType = (value: any) => {\n const stringValue = Object.prototype.toString.call(value);\n\n return (\n stringValue === \"[object RegExp]\" ||\n stringValue === \"[object Date]\" ||\n isReactElement(value)\n );\n};\n\nexport const isMergeableObject = (value: any): boolean => {\n return isNonNullObject(value) && !isSpecialType(value);\n};\n"],"mappings":";;;;AAqBA,MAAM,iBAAiB,UAAe;CACpC,MAAM,cAAc,OAAO,UAAU,SAAS,KAAK,MAAM;AAEzD,QACE,gBAAgB,qBAChB,gBAAgB,mBAChB,eAAe,MAAM;;AAIzB,MAAa,qBAAqB,UAAwB;AACxD,QAAO,gBAAgB,MAAM,IAAI,CAAC,cAAc,MAAM"}