yuppi 1.3.12 → 1.3.13
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/README.md +23 -23
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
[Number]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number
|
|
3
3
|
[Boolean]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean
|
|
4
4
|
[Object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object
|
|
5
|
-
[Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array
|
|
6
5
|
[Date]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date
|
|
7
6
|
[Buffer]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer
|
|
8
7
|
[Promise]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
|
|
@@ -76,19 +75,19 @@ Schemas that can be converted to Yup and JSON Schema.
|
|
|
76
75
|
You can install it as follows.
|
|
77
76
|
|
|
78
77
|
```shell
|
|
79
|
-
|
|
78
|
+
# NPM
|
|
80
79
|
npm add yuppi
|
|
81
80
|
|
|
82
|
-
|
|
81
|
+
# PNPM
|
|
83
82
|
pnpm add yuppi
|
|
84
83
|
|
|
85
|
-
|
|
84
|
+
# Yarn
|
|
86
85
|
yarn add yuppi
|
|
87
86
|
|
|
88
|
-
|
|
87
|
+
# Bun
|
|
89
88
|
bun add yuppi
|
|
90
89
|
|
|
91
|
-
|
|
90
|
+
# Deno
|
|
92
91
|
deno add yuppi
|
|
93
92
|
```
|
|
94
93
|
|
|
@@ -109,6 +108,7 @@ Yuppi
|
|
|
109
108
|
│ └── convertToJSONSchema(schema)
|
|
110
109
|
│
|
|
111
110
|
├── Patterns
|
|
111
|
+
│ │
|
|
112
112
|
│ ├── Domain
|
|
113
113
|
│ ├── Email
|
|
114
114
|
│ ├── HTTP
|
|
@@ -138,9 +138,9 @@ import { Yuppi, Patterns } from 'yuppi';
|
|
|
138
138
|
|
|
139
139
|
Yuppi schema builder.
|
|
140
140
|
|
|
141
|
-
> | Parameter | Default | Description
|
|
142
|
-
> | --------- | --------------------- |
|
|
143
|
-
> | options
|
|
141
|
+
> | Parameter | Type | Default | Description |
|
|
142
|
+
> | --------- | -------------- | --------------------- | ---------------------- |
|
|
143
|
+
> | options? | [YuppiOptions] | [YuppiOptionsDefault] | Constructor's options. |
|
|
144
144
|
>
|
|
145
145
|
> Example:
|
|
146
146
|
>
|
|
@@ -154,10 +154,10 @@ Yuppi schema builder.
|
|
|
154
154
|
|
|
155
155
|
Validate the properties with your Yuppi schema.
|
|
156
156
|
|
|
157
|
-
> | Parameter | Default | Description
|
|
158
|
-
> | ---------- | ------- |
|
|
159
|
-
> | schema |
|
|
160
|
-
> | properties |
|
|
157
|
+
> | Parameter | Type | Default | Description |
|
|
158
|
+
> | ---------- | ----------- | ------- | -------------------------- |
|
|
159
|
+
> | schema | [Schema] | | Yuppi schema. |
|
|
160
|
+
> | properties | [AnyObject] | | Properties to be validate. |
|
|
161
161
|
>
|
|
162
162
|
> returns [AnyObject]
|
|
163
163
|
>
|
|
@@ -218,10 +218,10 @@ Validate the properties with your Yuppi schema.
|
|
|
218
218
|
|
|
219
219
|
Declare your Yuppi schema for TypeScript.
|
|
220
220
|
|
|
221
|
-
> | Parameter | Default | Description
|
|
222
|
-
> | --------- | ------- |
|
|
223
|
-
> | schema |
|
|
224
|
-
> | name |
|
|
221
|
+
> | Parameter | Type | Default | Description |
|
|
222
|
+
> | --------- | -------- | ------- | ----------------- |
|
|
223
|
+
> | schema | [Schema] | | Yuppi schema. |
|
|
224
|
+
> | name | [String] | | Declaration name. |
|
|
225
225
|
>
|
|
226
226
|
> returns [Void]
|
|
227
227
|
>
|
|
@@ -248,9 +248,9 @@ Declare your Yuppi schema for TypeScript.
|
|
|
248
248
|
|
|
249
249
|
Convert your Yuppi schema into Yup schema.
|
|
250
250
|
|
|
251
|
-
> | Parameter | Default | Description
|
|
252
|
-
> | --------- | ------- |
|
|
253
|
-
> | schema |
|
|
251
|
+
> | Parameter | Type | Default | Description |
|
|
252
|
+
> | --------- | -------- | ------- | ------------- |
|
|
253
|
+
> | schema | [Schema] | | Yuppi schema. |
|
|
254
254
|
>
|
|
255
255
|
> returns [AnyObject]
|
|
256
256
|
>
|
|
@@ -266,9 +266,9 @@ Convert your Yuppi schema into Yup schema.
|
|
|
266
266
|
|
|
267
267
|
Convert your Yuppi schema into [JSON Schema](https://json-schema.org).
|
|
268
268
|
|
|
269
|
-
> | Parameter | Default | Description
|
|
270
|
-
> | --------- | ------- |
|
|
271
|
-
> | schema |
|
|
269
|
+
> | Parameter | Type | Default | Description |
|
|
270
|
+
> | --------- | -------- | ------- | ------------- |
|
|
271
|
+
> | schema | [Schema] | | Yuppi schema. |
|
|
272
272
|
>
|
|
273
273
|
> returns [JSONSchema]
|
|
274
274
|
>
|