@cleverbrush/schema 0.0.3 → 0.0.4
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 +2 -2
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ Any schema defined by object can contain the following fields:
|
|
|
23
23
|
- `type` - schema type (see the list above)
|
|
24
24
|
- `isRequired` - defines if `undefined` value is considered valid
|
|
25
25
|
- `isNullable` - defines if `null` value is considered valid
|
|
26
|
-
- `validators` - optional array of custom validation functions (see
|
|
26
|
+
- `validators` - optional array of custom validation functions (see Examples section at the bottom of this page)
|
|
27
27
|
|
|
28
28
|
### Number
|
|
29
29
|
|
|
@@ -274,6 +274,6 @@ There is a possibility to register a schema, give it a name and then reuse it:
|
|
|
274
274
|
|
|
275
275
|
// { valid: true }
|
|
276
276
|
|
|
277
|
-
## Examples
|
|
277
|
+
## Examples
|
|
278
278
|
|
|
279
279
|
For Examples see unit tests in the schemaValidator.tests.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cleverbrush/schema",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"object schema validator",
|
|
6
6
|
"schema",
|
|
@@ -9,12 +9,13 @@
|
|
|
9
9
|
"author": "Andrew Zolotukhin <andrew_zol@cleverbrush.com>",
|
|
10
10
|
"license": "BSD",
|
|
11
11
|
"main": "./dist/index.js",
|
|
12
|
+
"readme": "https://github.com/cleverbrush/libs/tree/master/libs/schema#readme",
|
|
12
13
|
"scripts": {
|
|
13
14
|
"watch": "tsc --watch",
|
|
14
15
|
"build": "tsc"
|
|
15
16
|
},
|
|
16
17
|
"dependencies": {
|
|
17
|
-
"@cleverbrush/deep": "0.0.
|
|
18
|
+
"@cleverbrush/deep": "0.0.4"
|
|
18
19
|
},
|
|
19
20
|
"types": "./dist/index.d.ts"
|
|
20
21
|
}
|