isvalid 4.1.26 → 4.1.28

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/lib/formalize.js +6 -1
  2. package/package.json +2 -2
package/lib/formalize.js CHANGED
@@ -80,7 +80,12 @@ const formalizeArray = (formalizedSchema, options) => {
80
80
  const formalizeAny = (schema, options = {}) => {
81
81
 
82
82
  // If schema is already formalized we just call back.
83
- if (options.force !== true && typeof schema._nonFormalizedSchema !== 'undefined') return schema;
83
+ if (typeof schema._nonFormalizedSchema !== 'undefined') {
84
+ if (options.force === true) {
85
+ return formalizeAny(schema._nonFormalizedSchema, options);
86
+ }
87
+ return schema;
88
+ }
84
89
 
85
90
  if (!schema.type && !schema.post && !schema.pre && !schema.equal) {
86
91
  if ('object' == instanceTypeName(schema)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isvalid",
3
- "version": "4.1.26",
3
+ "version": "4.1.28",
4
4
  "description": "Async JSON validation library for node.js.",
5
5
  "main": "./index.js",
6
6
  "type": "module",
@@ -42,6 +42,6 @@
42
42
  "url": "https://github.com/trenskow"
43
43
  },
44
44
  "dependencies": {
45
- "@trenskow/merge": "^0.1.33"
45
+ "@trenskow/merge": "^0.1.34"
46
46
  }
47
47
  }