@xyo-network/typeof 5.3.24 → 5.3.26

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 (2) hide show
  1. package/README.md +229 -10
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -1,23 +1,242 @@
1
+ [![logo][]](https://xyo.network)
2
+
1
3
  # @xyo-network/typeof
2
4
 
3
- [![logo][]](https://xyo.network)
5
+ [![npm][npm-badge]][npm-link]
6
+ [![license][license-badge]][license-link]
7
+
8
+ > Primary SDK for using XYO Protocol 2.0
9
+
10
+ ## Install
11
+
12
+ Using npm:
4
13
 
5
- Version: 5.0.2
14
+ ```sh
15
+ npm install {{name}}
16
+ ```
6
17
 
7
- Primary SDK for using XYO Protocol 2.0
18
+ Using yarn:
8
19
 
9
- ## Documentation
20
+ ```sh
21
+ yarn add {{name}}
22
+ ```
10
23
 
11
- [TypeDoc Generated Documentation](https://gitbook.xyo.network/xyo-data-lab/xyo-reference/package-documentation/xyo-network__typeof)
24
+ Using pnpm:
25
+
26
+ ```sh
27
+ pnpm add {{name}}
28
+ ```
29
+
30
+ Using bun:
31
+
32
+ ```sh
33
+ bun add {{name}}
34
+ ```
12
35
 
13
- Part of [sdk-xyo-client-js](https://www.npmjs.com/package/@xyo-network/sdk-xyo-client-js)
14
36
 
15
37
  ## License
16
38
 
17
- > See the [LICENSE](LICENSE) file for license details
39
+ See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
40
+
41
+ ## Reference
42
+
43
+ ### packages
44
+
45
+ ### shared
46
+
47
+ ### packages
48
+
49
+ ### typeof
50
+
51
+ ### .temp-typedoc
52
+
53
+ ### functions
54
+
55
+ ### <a id="ifDefined"></a>ifDefined
56
+
57
+ [**@xyo-network/typeof**](#../README)
58
+
59
+ ***
60
+
61
+ ```ts
62
+ function ifDefined<T>(value, function_): T | undefined;
63
+ ```
64
+
65
+ ## Type Parameters
66
+
67
+ ### T
68
+
69
+ `T`
70
+
71
+ ## Parameters
72
+
73
+ ### value
74
+
75
+ `T`
76
+
77
+ ### function\_
78
+
79
+ (`value`) => `void`
80
+
81
+ ## Returns
82
+
83
+ `T` \| `undefined`
84
+
85
+ ## Deprecated
86
+
87
+ use @xylabs/typeof or zod
88
+
89
+ ### <a id="ifTypeOf"></a>ifTypeOf
90
+
91
+ [**@xyo-network/typeof**](#../README)
92
+
93
+ ***
94
+
95
+ ```ts
96
+ function ifTypeOf<T, R>(
97
+ typeName,
98
+ value,
99
+ trueFunction,
100
+ isFunction?): R | undefined;
101
+ ```
102
+
103
+ ## Type Parameters
104
+
105
+ ### T
106
+
107
+ `T`
108
+
109
+ ### R
110
+
111
+ `R`
112
+
113
+ ## Parameters
114
+
115
+ ### typeName
116
+
117
+ [`TypeOfTypes`](#../type-aliases/TypeOfTypes)
118
+
119
+ ### value
120
+
121
+ `unknown`
122
+
123
+ ### trueFunction
124
+
125
+ (`value`) => `R`
126
+
127
+ ### isFunction?
128
+
129
+ (`value`) => `boolean`
130
+
131
+ ## Returns
132
+
133
+ `R` \| `undefined`
134
+
135
+ ## Deprecated
136
+
137
+ use @xylabs/typeof or zod
138
+
139
+ ### <a id="typeOf"></a>typeOf
140
+
141
+ [**@xyo-network/typeof**](#../README)
142
+
143
+ ***
144
+
145
+ ```ts
146
+ function typeOf<T>(item): TypeOfTypes;
147
+ ```
148
+
149
+ ## Type Parameters
150
+
151
+ ### T
152
+
153
+ `T`
154
+
155
+ ## Parameters
156
+
157
+ ### item
158
+
159
+ `T`
160
+
161
+ ## Returns
162
+
163
+ [`TypeOfTypes`](#../type-aliases/TypeOfTypes)
164
+
165
+ ## Deprecated
166
+
167
+ use @xylabs/typeof or zod
168
+
169
+ ### <a id="validateType"></a>validateType
170
+
171
+ [**@xyo-network/typeof**](#../README)
172
+
173
+ ***
174
+
175
+ ```ts
176
+ function validateType<T>(
177
+ typeName,
178
+ value,
179
+ optional?): [T | undefined, Error[]];
180
+ ```
181
+
182
+ ## Type Parameters
183
+
184
+ ### T
185
+
186
+ `T`
187
+
188
+ ## Parameters
189
+
190
+ ### typeName
191
+
192
+ [`TypeOfTypes`](#../type-aliases/TypeOfTypes)
193
+
194
+ ### value
195
+
196
+ `T`
197
+
198
+ ### optional?
199
+
200
+ `boolean` = `false`
201
+
202
+ ## Returns
203
+
204
+ \[`T` \| `undefined`, `Error`[]\]
205
+
206
+ ## Deprecated
207
+
208
+ use @xylabs/typeof or zod
209
+
210
+ ### type-aliases
211
+
212
+ ### <a id="TypeOfTypes"></a>TypeOfTypes
213
+
214
+ [**@xyo-network/typeof**](#../README)
215
+
216
+ ***
217
+
218
+ ```ts
219
+ type TypeOfTypes =
220
+ | "string"
221
+ | "number"
222
+ | "object"
223
+ | "array"
224
+ | "buffer"
225
+ | "null"
226
+ | "undefined"
227
+ | "bigint"
228
+ | "boolean"
229
+ | "function"
230
+ | "symbol";
231
+ ```
232
+
233
+ ## Deprecated
18
234
 
19
- ## Credits
235
+ use @xylabs/typeof or zod
20
236
 
21
- [Made with 🔥 and ❄️ by XYO](https://xyo.network)
22
237
 
23
- [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
238
+ [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
239
+ [npm-badge]: https://img.shields.io/npm/v/@xyo-network/typeof.svg
240
+ [npm-link]: https://www.npmjs.com/package/@xyo-network/typeof
241
+ [license-badge]: https://img.shields.io/npm/l/@xyo-network/typeof.svg
242
+ [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/typeof",
3
- "version": "5.3.24",
3
+ "version": "5.3.26",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -22,11 +22,11 @@
22
22
  "exports": {
23
23
  ".": {
24
24
  "types": "./dist/neutral/index.d.ts",
25
+ "import": "./dist/neutral/index.mjs",
25
26
  "default": "./dist/neutral/index.mjs"
26
27
  },
27
28
  "./package.json": "./package.json"
28
29
  },
29
- "module": "dist/neutral/index.mjs",
30
30
  "types": "dist/neutral/index.d.ts",
31
31
  "files": [
32
32
  "dist",
@@ -36,10 +36,10 @@
36
36
  "README.md"
37
37
  ],
38
38
  "devDependencies": {
39
- "@types/node": "^25.5.0",
40
- "@xylabs/ts-scripts-common": "~7.6.16",
41
- "@xylabs/ts-scripts-pnpm": "~7.6.16",
42
- "@xylabs/tsconfig": "~7.6.16",
39
+ "@types/node": "^25.5.2",
40
+ "@xylabs/ts-scripts-common": "~7.7.5",
41
+ "@xylabs/ts-scripts-pnpm": "~7.7.5",
42
+ "@xylabs/tsconfig": "~7.7.5",
43
43
  "acorn": "^8.16.0",
44
44
  "esbuild": "^0.28.0",
45
45
  "typescript": "~5.9.3"