teyit 1.0.4 → 1.0.6

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 +6 -2
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -163,7 +163,7 @@ Validate the properties with your Teyit schema.
163
163
  > | `schema` | [Schema] | | Teyit schema. |
164
164
  > | `properties` | [AnyObject] | | Properties to be validate. |
165
165
  >
166
- > returns [Promise]<[InferSchema<Schema>]>
166
+ > returns [Promise]<[InferSchema]\<Schema\>>
167
167
  >
168
168
  > Example:
169
169
  >
@@ -221,8 +221,10 @@ Validate the properties with your Teyit schema.
221
221
  > permissions: '*'
222
222
  > };
223
223
  >
224
+ > let fields;
225
+ >
224
226
  > try {
225
- > await teyit.validate(schema, properties);
227
+ > fields = await teyit.validate(schema, properties);
226
228
  > /*
227
229
  > {
228
230
  > display_name: "Fırat",
@@ -245,6 +247,8 @@ Validate the properties with your Teyit schema.
245
247
  > }
246
248
  > */
247
249
  > }
250
+ >
251
+ > console.log(fields.display_name); // "Fırat"
248
252
  > ```
249
253
 
250
254
  <br/>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "teyit",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Portable and simple schemas for property validation.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/keift/teyit",