Generated-output differences

quicktype output changed between the PR base and tested PR merge revisions.
← Back to the pull request
312test cases
993files differ
991modified
2new
0deleted
2,396changed lines
+1,405 −991insertions / deletions
Base 66df8a7480383ad7d4784464b395df83fd482c7f · PR merge f523a04577d7dee4c000ea7e64e373a9acc7afcf · Head 0bbbc85f587c3907ed29e4665c03bf805d978667 · raw patch
Test case

test/inputs/graphql/github1.graphql

3 generated files · +3 −3
Mgraphql-flowdefault / TopLevel.js+1 −1
@@ -149,7 +149,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
149149 if (Array.isArray(typ)) return transformEnum(typ, val);
150150 if (typeof typ === "object") {
151151 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
152- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
154154 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
155155 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mgraphql-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mgraphql-typescriptdefault / TopLevel.ts+1 −1
@@ -149,7 +149,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
149149 if (Array.isArray(typ)) return transformEnum(typ, val);
150150 if (typeof typ === "object") {
151151 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
152- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
154154 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
155155 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/graphql/github2.graphql

3 generated files · +3 −3
Mgraphql-flowdefault / TopLevel.js+1 −1
@@ -158,7 +158,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
158158 if (Array.isArray(typ)) return transformEnum(typ, val);
159159 if (typeof typ === "object") {
160160 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
161- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
161+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
162162 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
163163 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
164164 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mgraphql-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mgraphql-typescriptdefault / TopLevel.ts+1 −1
@@ -158,7 +158,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
158158 if (Array.isArray(typ)) return transformEnum(typ, val);
159159 if (typeof typ === "object") {
160160 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
161- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
161+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
162162 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
163163 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
164164 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/graphql/github3.graphql

3 generated files · +3 −3
Mgraphql-flowdefault / TopLevel.js+1 −1
@@ -166,7 +166,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
166166 if (Array.isArray(typ)) return transformEnum(typ, val);
167167 if (typeof typ === "object") {
168168 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
169- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
169+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
170170 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
171171 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
172172 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mgraphql-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mgraphql-typescriptdefault / TopLevel.ts+1 −1
@@ -163,7 +163,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
163163 if (Array.isArray(typ)) return transformEnum(typ, val);
164164 if (typeof typ === "object") {
165165 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
166- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
166+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
167167 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
168168 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
169169 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/graphql/github4.graphql

3 generated files · +3 −3
Mgraphql-flowdefault / TopLevel.js+1 −1
@@ -167,7 +167,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
167167 if (Array.isArray(typ)) return transformEnum(typ, val);
168168 if (typeof typ === "object") {
169169 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
170- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
170+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171171 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
173173 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mgraphql-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mgraphql-typescriptdefault / TopLevel.ts+1 −1
@@ -164,7 +164,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
164164 if (Array.isArray(typ)) return transformEnum(typ, val);
165165 if (typeof typ === "object") {
166166 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
167- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
167+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
168168 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
169169 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
170170 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/graphql/github5.graphql

3 generated files · +3 −3
Mgraphql-flowdefault / TopLevel.js+1 −1
@@ -149,7 +149,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
149149 if (Array.isArray(typ)) return transformEnum(typ, val);
150150 if (typeof typ === "object") {
151151 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
152- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
154154 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
155155 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mgraphql-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mgraphql-typescriptdefault / TopLevel.ts+1 −1
@@ -149,7 +149,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
149149 if (Array.isArray(typ)) return transformEnum(typ, val);
150150 if (typeof typ === "object") {
151151 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
152- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
154154 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
155155 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/graphql/github6.graphql

3 generated files · +3 −3
Mgraphql-flowdefault / TopLevel.js+1 −1
@@ -149,7 +149,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
149149 if (Array.isArray(typ)) return transformEnum(typ, val);
150150 if (typeof typ === "object") {
151151 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
152- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
154154 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
155155 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mgraphql-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mgraphql-typescriptdefault / TopLevel.ts+1 −1
@@ -149,7 +149,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
149149 if (Array.isArray(typ)) return transformEnum(typ, val);
150150 if (typeof typ === "object") {
151151 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
152- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
154154 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
155155 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/graphql/github7.graphql

3 generated files · +3 −3
Mgraphql-flowdefault / TopLevel.js+1 −1
@@ -170,7 +170,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
170170 if (Array.isArray(typ)) return transformEnum(typ, val);
171171 if (typeof typ === "object") {
172172 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
173- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
173+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
174174 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
175175 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
176176 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mgraphql-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mgraphql-typescriptdefault / TopLevel.ts+1 −1
@@ -170,7 +170,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
170170 if (Array.isArray(typ)) return transformEnum(typ, val);
171171 if (typeof typ === "object") {
172172 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
173- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
173+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
174174 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
175175 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
176176 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/graphql/github8.graphql

3 generated files · +3 −3
Mgraphql-flowdefault / TopLevel.js+1 −1
@@ -160,7 +160,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
160160 if (Array.isArray(typ)) return transformEnum(typ, val);
161161 if (typeof typ === "object") {
162162 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
163- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
163+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
164164 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
165165 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
166166 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mgraphql-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mgraphql-typescriptdefault / TopLevel.ts+1 −1
@@ -158,7 +158,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
158158 if (Array.isArray(typ)) return transformEnum(typ, val);
159159 if (typeof typ === "object") {
160160 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
161- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
161+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
162162 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
163163 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
164164 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/graphql/github9.graphql

3 generated files · +3 −3
Mgraphql-flowdefault / TopLevel.js+1 −1
@@ -167,7 +167,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
167167 if (Array.isArray(typ)) return transformEnum(typ, val);
168168 if (typeof typ === "object") {
169169 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
170- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
170+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171171 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
173173 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mgraphql-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mgraphql-typescriptdefault / TopLevel.ts+1 −1
@@ -161,7 +161,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
161161 if (Array.isArray(typ)) return transformEnum(typ, val);
162162 if (typeof typ === "object") {
163163 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
164- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
164+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
165165 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
166166 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
167167 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/javascript/unicode-codepoint-length.schema

2 generated files · +414 −0
Aschema-javascriptdefault / TopLevel.js+205 −0
@@ -0,0 +1,205 @@
1+// To parse this data:
2+//
3+// const Convert = require("./TopLevel");
4+//
5+// const topLevel = Convert.toTopLevel(json);
6+//
7+// These functions will throw an error if the JSON doesn't
8+// match the expected interface, even if the JSON is valid.
9+
10+// Converts JSON strings to/from your types
11+// and asserts the results of JSON.parse at runtime
12+function toTopLevel(json) {
13+ return cast(JSON.parse(json), r("TopLevel"));
14+}
15+
16+function topLevelToJson(value) {
17+ return JSON.stringify(uncast(value, r("TopLevel")), null, 2);
18+}
19+
20+function invalidValue(typ, val, key, parent = '') {
21+ const prettyTyp = prettyTypeName(typ);
22+ const parentText = parent ? ` on ${parent}` : '';
23+ const keyText = key ? ` for key "${key}"` : '';
24+ throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`);
25+}
26+
27+function prettyTypeName(typ) {
28+ if (Array.isArray(typ)) {
29+ if (typ.length === 2 && typ[0] === undefined) {
30+ return `an optional ${prettyTypeName(typ[1])}`;
31+ } else {
32+ return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`;
33+ }
34+ } else if (typeof typ === "object" && typ.literal !== undefined) {
35+ return typ.literal;
36+ } else {
37+ return typeof typ;
38+ }
39+}
40+
41+function jsonToJSProps(typ) {
42+ if (typ.jsonToJS === undefined) {
43+ const map = {};
44+ typ.props.forEach((p) => map[p.json] = { key: p.js, typ: p.typ });
45+ typ.jsonToJS = map;
46+ }
47+ return typ.jsonToJS;
48+}
49+
50+function jsToJSONProps(typ) {
51+ if (typ.jsToJSON === undefined) {
52+ const map = {};
53+ typ.props.forEach((p) => map[p.js] = { key: p.json, typ: p.typ });
54+ typ.jsToJSON = map;
55+ }
56+ return typ.jsToJSON;
57+}
58+
59+function transform(val, typ, getProps, key = '', parent = '') {
60+ function transformPrimitive(typ, val) {
61+ if (typeof typ === typeof val) return val;
62+ return invalidValue(typ, val, key, parent);
63+ }
64+
65+ function transformUnion(typs, val) {
66+ // val must validate against one typ in typs
67+ const l = typs.length;
68+ for (let i = 0; i < l; i++) {
69+ const typ = typs[i];
70+ try {
71+ return transform(val, typ, getProps);
72+ } catch (_) {}
73+ }
74+ return invalidValue(typs, val, key, parent);
75+ }
76+
77+ function transformEnum(cases, val) {
78+ if (cases.indexOf(val) !== -1) return val;
79+ return invalidValue(cases.map(a => { return l(a); }), val, key, parent);
80+ }
81+
82+ function transformArray(typ, val) {
83+ // val must be an array with no invalid elements
84+ if (!Array.isArray(val)) return invalidValue(l("array"), val, key, parent);
85+
86+ return val.map(el => transform(el, typ, getProps));
87+ }
88+
89+ function transformDate(val) {
90+ if (val === null) {
91+ return null;
92+ }
93+ const d = new Date(val);
94+ if (isNaN(d.valueOf())) {
95+ return invalidValue(l("Date"), val, key, parent);
96+ }
97+ return d;
98+ }
99+
100+ function transformObject(props, additional, val) {
101+ if (val === null || typeof val !== "object" || Array.isArray(val)) {
102+ return invalidValue(l(ref || "object"), val, key, parent);
103+ }
104+ const result = {};
105+ Object.getOwnPropertyNames(props).forEach(key => {
106+ const prop = props[key];
107+ const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
108+ result[prop.key] = transform(v, prop.typ, getProps, key, ref);
109+ });
110+ Object.getOwnPropertyNames(val).forEach(key => {
111+ if (!Object.prototype.hasOwnProperty.call(props, key)) {
112+ result[key] = transform(val[key], additional, getProps, key, ref);
113+ }
114+ });
115+ return result;
116+ }
117+
118+ if (typ === "any") return val;
119+ if (typ === null) {
120+ if (val === null) return val;
121+ return invalidValue(typ, val, key, parent);
122+ }
123+ if (typ === false) return invalidValue(typ, val, key, parent);
124+ let ref = undefined;
125+ while (typeof typ === "object" && typ.ref !== undefined) {
126+ ref = typ.ref;
127+ typ = typeMap[typ.ref];
128+ }
129+ if (Array.isArray(typ)) return transformEnum(typ, val);
130+ if (typeof typ === "object") {
131+ return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133+ : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134+ : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135+ : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
136+ : typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val)
137+ : typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val)
138+ : invalidValue(typ, val, key, parent);
139+ }
140+ // Numbers can be parsed by Date but shouldn't be.
141+ if (typ === Date && typeof val !== "number") return transformDate(val);
142+ return transformPrimitive(typ, val);
143+}
144+
145+function cast(val, typ) {
146+ return transform(val, typ, jsonToJSProps);
147+}
148+
149+function uncast(val, typ) {
150+ return transform(val, typ, jsToJSONProps);
151+}
152+
153+function l(typ) {
154+ return { literal: typ };
155+}
156+
157+function a(typ) {
158+ return { arrayItems: typ };
159+}
160+
161+function i(typ) {
162+ return { integer: typ };
163+}
164+
165+function p(pattern) {
166+ return { pattern };
167+}
168+
169+function s(typ, min, max) {
170+ return { string: typ, min, max };
171+}
172+
173+function n(typ, min, max) {
174+ return { number: typ, min, max };
175+}
176+
177+function u(...typs) {
178+ return { unionMembers: typs };
179+}
180+
181+function o(props, additional) {
182+ return { props, additional };
183+}
184+
185+function m(additional) {
186+ const props = [];
187+ return { props, additional };
188+}
189+
190+function r(name) {
191+ return { ref: name };
192+}
193+
194+const typeMap = {
195+ "TopLevel": o([
196+ { json: "exact", js: "exact", typ: s(p("^[^!]+$"), 2, 2) },
197+ { json: "maximum", js: "maximum", typ: s("", undefined, 1) },
198+ { json: "minimum", js: "minimum", typ: s("", 2, undefined) },
199+ ], "any"),
200+};
201+
202+module.exports = {
203+ "topLevelToJson": topLevelToJson,
204+ "toTopLevel": toTopLevel,
205+};
Aschema-typescriptdefault / TopLevel.ts+209 −0
@@ -0,0 +1,209 @@
1+// To parse this data:
2+//
3+// import { Convert, TopLevel } from "./TopLevel";
4+//
5+// const topLevel = Convert.toTopLevel(json);
6+//
7+// These functions will throw an error if the JSON doesn't
8+// match the expected interface, even if the JSON is valid.
9+
10+export interface TopLevel {
11+ exact: string;
12+ maximum: string;
13+ minimum: string;
14+ [property: string]: unknown | string | string | string;
15+}
16+
17+// Converts JSON strings to/from your types
18+// and asserts the results of JSON.parse at runtime
19+export class Convert {
20+ public static toTopLevel(json: string): TopLevel {
21+ return cast(JSON.parse(json), r("TopLevel"));
22+ }
23+
24+ public static topLevelToJson(value: TopLevel): string {
25+ return JSON.stringify(uncast(value, r("TopLevel")), null, 2);
26+ }
27+}
28+
29+function invalidValue(typ: any, val: any, key: any, parent: any = ''): never {
30+ const prettyTyp = prettyTypeName(typ);
31+ const parentText = parent ? ` on ${parent}` : '';
32+ const keyText = key ? ` for key "${key}"` : '';
33+ throw Error(`Invalid value${keyText}${parentText}. Expected ${prettyTyp} but got ${JSON.stringify(val)}`);
34+}
35+
36+function prettyTypeName(typ: any): string {
37+ if (Array.isArray(typ)) {
38+ if (typ.length === 2 && typ[0] === undefined) {
39+ return `an optional ${prettyTypeName(typ[1])}`;
40+ } else {
41+ return `one of [${typ.map(a => { return prettyTypeName(a); }).join(", ")}]`;
42+ }
43+ } else if (typeof typ === "object" && typ.literal !== undefined) {
44+ return typ.literal;
45+ } else {
46+ return typeof typ;
47+ }
48+}
49+
50+function jsonToJSProps(typ: any): any {
51+ if (typ.jsonToJS === undefined) {
52+ const map: any = {};
53+ typ.props.forEach((p: any) => map[p.json] = { key: p.js, typ: p.typ });
54+ typ.jsonToJS = map;
55+ }
56+ return typ.jsonToJS;
57+}
58+
59+function jsToJSONProps(typ: any): any {
60+ if (typ.jsToJSON === undefined) {
61+ const map: any = {};
62+ typ.props.forEach((p: any) => map[p.js] = { key: p.json, typ: p.typ });
63+ typ.jsToJSON = map;
64+ }
65+ return typ.jsToJSON;
66+}
67+
68+function transform(val: any, typ: any, getProps: any, key: any = '', parent: any = ''): any {
69+ function transformPrimitive(typ: string, val: any): any {
70+ if (typeof typ === typeof val) return val;
71+ return invalidValue(typ, val, key, parent);
72+ }
73+
74+ function transformUnion(typs: any[], val: any): any {
75+ // val must validate against one typ in typs
76+ const l = typs.length;
77+ for (let i = 0; i < l; i++) {
78+ const typ = typs[i];
79+ try {
80+ return transform(val, typ, getProps);
81+ } catch (_) {}
82+ }
83+ return invalidValue(typs, val, key, parent);
84+ }
85+
86+ function transformEnum(cases: string[], val: any): any {
87+ if (cases.indexOf(val) !== -1) return val;
88+ return invalidValue(cases.map(a => { return l(a); }), val, key, parent);
89+ }
90+
91+ function transformArray(typ: any, val: any): any {
92+ // val must be an array with no invalid elements
93+ if (!Array.isArray(val)) return invalidValue(l("array"), val, key, parent);
94+
95+ return val.map(el => transform(el, typ, getProps));
96+ }
97+
98+ function transformDate(val: any): any {
99+ if (val === null) {
100+ return null;
101+ }
102+ const d = new Date(val);
103+ if (isNaN(d.valueOf())) {
104+ return invalidValue(l("Date"), val, key, parent);
105+ }
106+ return d;
107+ }
108+
109+ function transformObject(props: { [k: string]: any }, additional: any, val: any): any {
110+ if (val === null || typeof val !== "object" || Array.isArray(val)) {
111+ return invalidValue(l(ref || "object"), val, key, parent);
112+ }
113+ const result: any = {};
114+ Object.getOwnPropertyNames(props).forEach(key => {
115+ const prop = props[key];
116+ const v = Object.prototype.hasOwnProperty.call(val, key) ? val[key] : undefined;
117+ result[prop.key] = transform(v, prop.typ, getProps, key, ref);
118+ });
119+ Object.getOwnPropertyNames(val).forEach(key => {
120+ if (!Object.prototype.hasOwnProperty.call(props, key)) {
121+ result[key] = transform(val[key], additional, getProps, key, ref);
122+ }
123+ });
124+ return result;
125+ }
126+
127+ if (typ === "any") return val;
128+ if (typ === null) {
129+ if (val === null) return val;
130+ return invalidValue(typ, val, key, parent);
131+ }
132+ if (typ === false) return invalidValue(typ, val, key, parent);
133+ let ref: any = undefined;
134+ while (typeof typ === "object" && typ.ref !== undefined) {
135+ ref = typ.ref;
136+ typ = typeMap[typ.ref];
137+ }
138+ if (Array.isArray(typ)) return transformEnum(typ, val);
139+ if (typeof typ === "object") {
140+ return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144+ : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
145+ : typ.hasOwnProperty("arrayItems") ? transformArray(typ.arrayItems, val)
146+ : typ.hasOwnProperty("props") ? transformObject(getProps(typ), typ.additional, val)
147+ : invalidValue(typ, val, key, parent);
148+ }
149+ // Numbers can be parsed by Date but shouldn't be.
150+ if (typ === Date && typeof val !== "number") return transformDate(val);
151+ return transformPrimitive(typ, val);
152+}
153+
154+function cast<T>(val: any, typ: any): T {
155+ return transform(val, typ, jsonToJSProps);
156+}
157+
158+function uncast<T>(val: T, typ: any): any {
159+ return transform(val, typ, jsToJSONProps);
160+}
161+
162+function l(typ: any) {
163+ return { literal: typ };
164+}
165+
166+function a(typ: any) {
167+ return { arrayItems: typ };
168+}
169+
170+function i(typ: any) {
171+ return { integer: typ };
172+}
173+
174+function p(pattern: any) {
175+ return { pattern };
176+}
177+
178+function s(typ: any, min: any, max: any) {
179+ return { string: typ, min, max };
180+}
181+
182+function n(typ: any, min: any, max: any) {
183+ return { number: typ, min, max };
184+}
185+
186+function u(...typs: any[]) {
187+ return { unionMembers: typs };
188+}
189+
190+function o(props: any[], additional: any) {
191+ return { props, additional };
192+}
193+
194+function m(additional: any) {
195+ const props: any[] = [];
196+ return { props, additional };
197+}
198+
199+function r(name: string) {
200+ return { ref: name };
201+}
202+
203+const typeMap: any = {
204+ "TopLevel": o([
205+ { json: "exact", js: "exact", typ: s(p("^[^!]+$"), 2, 2) },
206+ { json: "maximum", js: "maximum", typ: s("", undefined, 1) },
207+ { json: "minimum", js: "minimum", typ: s("", 2, undefined) },
208+ ], "any"),
209+};
Test case

test/inputs/json/misc/00c36.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -163,7 +163,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
163163 if (Array.isArray(typ)) return transformEnum(typ, val);
164164 if (typeof typ === "object") {
165165 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
166- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
166+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
167167 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
168168 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
169169 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -159,7 +159,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
159159 if (Array.isArray(typ)) return transformEnum(typ, val);
160160 if (typeof typ === "object") {
161161 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
162- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
162+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
163163 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
164164 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
165165 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/00ec5.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -202,7 +202,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
202202 if (Array.isArray(typ)) return transformEnum(typ, val);
203203 if (typeof typ === "object") {
204204 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
205- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
205+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
206206 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
207207 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
208208 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -201,7 +201,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
201201 if (Array.isArray(typ)) return transformEnum(typ, val);
202202 if (typeof typ === "object") {
203203 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
204- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
204+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
205205 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
206206 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
207207 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/010b1.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -144,7 +144,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
144144 if (Array.isArray(typ)) return transformEnum(typ, val);
145145 if (typeof typ === "object") {
146146 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
147- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
150150 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/016af.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/033b1.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/050b0.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -191,7 +191,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
191191 if (Array.isArray(typ)) return transformEnum(typ, val);
192192 if (typeof typ === "object") {
193193 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
194- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
194+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
195195 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
196196 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
197197 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -175,7 +175,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
175175 if (Array.isArray(typ)) return transformEnum(typ, val);
176176 if (typeof typ === "object") {
177177 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
178- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
178+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
179179 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
180180 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
181181 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/06bee.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -179,7 +179,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
179179 if (Array.isArray(typ)) return transformEnum(typ, val);
180180 if (typeof typ === "object") {
181181 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
182- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
182+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
183183 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
184184 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
185185 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -170,7 +170,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
170170 if (Array.isArray(typ)) return transformEnum(typ, val);
171171 if (typeof typ === "object") {
172172 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
173- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
173+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
174174 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
175175 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
176176 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/07540.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -135,7 +135,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
135135 if (Array.isArray(typ)) return transformEnum(typ, val);
136136 if (typeof typ === "object") {
137137 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
138- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
138+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139139 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
141141 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/0779f.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/07c75.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -160,7 +160,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
160160 if (Array.isArray(typ)) return transformEnum(typ, val);
161161 if (typeof typ === "object") {
162162 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
163- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
163+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
164164 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
165165 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
166166 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -160,7 +160,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
160160 if (Array.isArray(typ)) return transformEnum(typ, val);
161161 if (typeof typ === "object") {
162162 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
163- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
163+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
164164 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
165165 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
166166 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/09f54.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -148,7 +148,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
148148 if (Array.isArray(typ)) return transformEnum(typ, val);
149149 if (typeof typ === "object") {
150150 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
151- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
154154 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -148,7 +148,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
148148 if (Array.isArray(typ)) return transformEnum(typ, val);
149149 if (typeof typ === "object") {
150150 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
151- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
154154 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/0a358.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -153,7 +153,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
153153 if (Array.isArray(typ)) return transformEnum(typ, val);
154154 if (typeof typ === "object") {
155155 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
156- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
156+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
157157 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
158158 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
159159 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -150,7 +150,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
150150 if (Array.isArray(typ)) return transformEnum(typ, val);
151151 if (typeof typ === "object") {
152152 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
153- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
153+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
154154 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
155155 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
156156 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/0a91a.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -355,7 +355,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
355355 if (Array.isArray(typ)) return transformEnum(typ, val);
356356 if (typeof typ === "object") {
357357 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
358- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
358+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
359359 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
360360 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
361361 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -350,7 +350,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
350350 if (Array.isArray(typ)) return transformEnum(typ, val);
351351 if (typeof typ === "object") {
352352 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
353- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
353+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
354354 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
355355 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
356356 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/0b91a.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -176,7 +176,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
176176 if (typeof typ === "object") {
177177 return typ.hasOwnProperty("uuid") ? typeof val === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(val) ? val : invalidValue(typ, val, key, parent)
178178 : typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
179- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
179+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
180180 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
181181 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
182182 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -130,7 +130,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("uuid") ? typeof val === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(val) ? val : invalidValue(typ, val, key, parent)
132132 : typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
133- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
135135 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
136136 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -176,7 +176,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
176176 if (typeof typ === "object") {
177177 return typ.hasOwnProperty("uuid") ? typeof val === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(val) ? val : invalidValue(typ, val, key, parent)
178178 : typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
179- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
179+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
180180 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
181181 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
182182 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/0cffa.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -250,7 +250,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
250250 if (Array.isArray(typ)) return transformEnum(typ, val);
251251 if (typeof typ === "object") {
252252 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
253- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
253+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
254254 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
255255 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
256256 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -243,7 +243,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
243243 if (Array.isArray(typ)) return transformEnum(typ, val);
244244 if (typeof typ === "object") {
245245 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
246- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
246+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
247247 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
248248 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
249249 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/0e0c2.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -212,7 +212,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
212212 if (Array.isArray(typ)) return transformEnum(typ, val);
213213 if (typeof typ === "object") {
214214 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
215- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
215+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
216216 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
217217 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
218218 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -206,7 +206,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
206206 if (Array.isArray(typ)) return transformEnum(typ, val);
207207 if (typeof typ === "object") {
208208 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
209- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
209+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
210210 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
211211 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
212212 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/0fecf.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -135,7 +135,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
135135 if (Array.isArray(typ)) return transformEnum(typ, val);
136136 if (typeof typ === "object") {
137137 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
138- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
138+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139139 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
141141 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -135,7 +135,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
135135 if (Array.isArray(typ)) return transformEnum(typ, val);
136136 if (typeof typ === "object") {
137137 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
138- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
138+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139139 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
141141 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/10be4.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -202,7 +202,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
202202 if (Array.isArray(typ)) return transformEnum(typ, val);
203203 if (typeof typ === "object") {
204204 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
205- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
205+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
206206 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
207207 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
208208 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -175,7 +175,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
175175 if (Array.isArray(typ)) return transformEnum(typ, val);
176176 if (typeof typ === "object") {
177177 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
178- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
178+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
179179 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
180180 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
181181 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/112b5.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -148,7 +148,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
148148 if (Array.isArray(typ)) return transformEnum(typ, val);
149149 if (typeof typ === "object") {
150150 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
151- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
154154 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/127a1.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -249,7 +249,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
249249 if (Array.isArray(typ)) return transformEnum(typ, val);
250250 if (typeof typ === "object") {
251251 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
252- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
252+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
253253 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
254254 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
255255 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -243,7 +243,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
243243 if (Array.isArray(typ)) return transformEnum(typ, val);
244244 if (typeof typ === "object") {
245245 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
246- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
246+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
247247 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
248248 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
249249 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/13d8d.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -161,7 +161,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
161161 if (Array.isArray(typ)) return transformEnum(typ, val);
162162 if (typeof typ === "object") {
163163 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
164- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
164+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
165165 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
166166 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
167167 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -161,7 +161,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
161161 if (Array.isArray(typ)) return transformEnum(typ, val);
162162 if (typeof typ === "object") {
163163 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
164- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
164+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
165165 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
166166 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
167167 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/14d38.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/167d6.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/16bc5.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -233,7 +233,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
233233 if (Array.isArray(typ)) return transformEnum(typ, val);
234234 if (typeof typ === "object") {
235235 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
236- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
236+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
237237 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
238238 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
239239 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -233,7 +233,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
233233 if (Array.isArray(typ)) return transformEnum(typ, val);
234234 if (typeof typ === "object") {
235235 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
236- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
236+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
237237 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
238238 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
239239 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/176f1.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -160,7 +160,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
160160 if (Array.isArray(typ)) return transformEnum(typ, val);
161161 if (typeof typ === "object") {
162162 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
163- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
163+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
164164 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
165165 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
166166 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -160,7 +160,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
160160 if (Array.isArray(typ)) return transformEnum(typ, val);
161161 if (typeof typ === "object") {
162162 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
163- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
163+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
164164 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
165165 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
166166 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/1a7f5.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -144,7 +144,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
144144 if (Array.isArray(typ)) return transformEnum(typ, val);
145145 if (typeof typ === "object") {
146146 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
147- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
150150 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/1b28c.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/1b409.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -226,7 +226,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
226226 if (Array.isArray(typ)) return transformEnum(typ, val);
227227 if (typeof typ === "object") {
228228 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
229- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
229+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
230230 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
231231 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
232232 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -209,7 +209,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
209209 if (Array.isArray(typ)) return transformEnum(typ, val);
210210 if (typeof typ === "object") {
211211 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
212- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
212+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
213213 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
214214 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
215215 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/2465e.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -208,7 +208,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
208208 if (Array.isArray(typ)) return transformEnum(typ, val);
209209 if (typeof typ === "object") {
210210 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
211- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
211+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
212212 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
213213 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
214214 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -208,7 +208,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
208208 if (Array.isArray(typ)) return transformEnum(typ, val);
209209 if (typeof typ === "object") {
210210 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
211- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
211+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
212212 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
213213 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
214214 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/24f52.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/262f0.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -238,7 +238,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
238238 if (Array.isArray(typ)) return transformEnum(typ, val);
239239 if (typeof typ === "object") {
240240 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
241- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
241+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
242242 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
243243 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
244244 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -235,7 +235,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
235235 if (Array.isArray(typ)) return transformEnum(typ, val);
236236 if (typeof typ === "object") {
237237 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
238- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
238+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
239239 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
240240 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
241241 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/26b49.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -247,7 +247,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
247247 if (Array.isArray(typ)) return transformEnum(typ, val);
248248 if (typeof typ === "object") {
249249 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
250- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
250+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
251251 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
252252 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
253253 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -242,7 +242,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
242242 if (Array.isArray(typ)) return transformEnum(typ, val);
243243 if (typeof typ === "object") {
244244 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
245- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
245+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
246246 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
247247 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
248248 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/26c9c.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -322,7 +322,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
322322 if (Array.isArray(typ)) return transformEnum(typ, val);
323323 if (typeof typ === "object") {
324324 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
325- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
325+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
326326 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
327327 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
328328 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -322,7 +322,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
322322 if (Array.isArray(typ)) return transformEnum(typ, val);
323323 if (typeof typ === "object") {
324324 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
325- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
325+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
326326 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
327327 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
328328 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/27332.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -288,7 +288,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
288288 if (Array.isArray(typ)) return transformEnum(typ, val);
289289 if (typeof typ === "object") {
290290 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
291- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
291+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
292292 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
293293 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
294294 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -274,7 +274,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
274274 if (Array.isArray(typ)) return transformEnum(typ, val);
275275 if (typeof typ === "object") {
276276 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
277- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
277+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
278278 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
279279 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
280280 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/29f47.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -274,7 +274,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
274274 if (Array.isArray(typ)) return transformEnum(typ, val);
275275 if (typeof typ === "object") {
276276 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
277- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
277+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
278278 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
279279 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
280280 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -261,7 +261,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
261261 if (Array.isArray(typ)) return transformEnum(typ, val);
262262 if (typeof typ === "object") {
263263 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
264- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
264+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
265265 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
266266 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
267267 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/2d4e2.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -242,7 +242,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
242242 if (Array.isArray(typ)) return transformEnum(typ, val);
243243 if (typeof typ === "object") {
244244 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
245- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
245+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
246246 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
247247 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
248248 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -219,7 +219,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
219219 if (Array.isArray(typ)) return transformEnum(typ, val);
220220 if (typeof typ === "object") {
221221 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
222- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
222+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
223223 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
224224 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
225225 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/2df80.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -208,7 +208,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
208208 if (Array.isArray(typ)) return transformEnum(typ, val);
209209 if (typeof typ === "object") {
210210 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
211- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
211+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
212212 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
213213 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
214214 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -164,7 +164,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
164164 if (Array.isArray(typ)) return transformEnum(typ, val);
165165 if (typeof typ === "object") {
166166 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
167- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
167+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
168168 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
169169 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
170170 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/31189.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -163,7 +163,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
163163 if (Array.isArray(typ)) return transformEnum(typ, val);
164164 if (typeof typ === "object") {
165165 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
166- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
166+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
167167 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
168168 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
169169 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -162,7 +162,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
162162 if (Array.isArray(typ)) return transformEnum(typ, val);
163163 if (typeof typ === "object") {
164164 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
165- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
165+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
166166 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
167167 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
168168 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/32431.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -206,7 +206,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
206206 if (Array.isArray(typ)) return transformEnum(typ, val);
207207 if (typeof typ === "object") {
208208 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
209- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
209+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
210210 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
211211 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
212212 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -198,7 +198,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
198198 if (Array.isArray(typ)) return transformEnum(typ, val);
199199 if (typeof typ === "object") {
200200 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
201- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
201+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
202202 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
203203 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
204204 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/32d5c.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -144,7 +144,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
144144 if (Array.isArray(typ)) return transformEnum(typ, val);
145145 if (typeof typ === "object") {
146146 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
147- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
150150 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -144,7 +144,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
144144 if (Array.isArray(typ)) return transformEnum(typ, val);
145145 if (typeof typ === "object") {
146146 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
147- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
150150 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/337ed.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -203,7 +203,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
203203 if (Array.isArray(typ)) return transformEnum(typ, val);
204204 if (typeof typ === "object") {
205205 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
206- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
206+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
207207 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
208208 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
209209 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -193,7 +193,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
193193 if (Array.isArray(typ)) return transformEnum(typ, val);
194194 if (typeof typ === "object") {
195195 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
196- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
196+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
197197 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
198198 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
199199 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/33d2e.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -188,7 +188,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
188188 if (Array.isArray(typ)) return transformEnum(typ, val);
189189 if (typeof typ === "object") {
190190 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
191- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
191+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
192192 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
193193 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
194194 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -176,7 +176,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
176176 if (Array.isArray(typ)) return transformEnum(typ, val);
177177 if (typeof typ === "object") {
178178 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
179- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
179+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
180180 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
181181 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
182182 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/34702.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -223,7 +223,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
223223 if (Array.isArray(typ)) return transformEnum(typ, val);
224224 if (typeof typ === "object") {
225225 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
226- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
226+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
227227 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
228228 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
229229 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -190,7 +190,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
190190 if (Array.isArray(typ)) return transformEnum(typ, val);
191191 if (typeof typ === "object") {
192192 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
193- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
193+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
194194 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
195195 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
196196 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/3536b.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -170,7 +170,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
170170 if (Array.isArray(typ)) return transformEnum(typ, val);
171171 if (typeof typ === "object") {
172172 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
173- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
173+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
174174 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
175175 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
176176 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -164,7 +164,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
164164 if (Array.isArray(typ)) return transformEnum(typ, val);
165165 if (typeof typ === "object") {
166166 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
167- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
167+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
168168 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
169169 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
170170 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/3659d.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/36d5d.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/3a6b3.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/3e9a3.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -160,7 +160,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
160160 if (Array.isArray(typ)) return transformEnum(typ, val);
161161 if (typeof typ === "object") {
162162 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
163- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
163+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
164164 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
165165 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
166166 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -160,7 +160,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
160160 if (Array.isArray(typ)) return transformEnum(typ, val);
161161 if (typeof typ === "object") {
162162 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
163- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
163+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
164164 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
165165 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
166166 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/3f1ce.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -236,7 +236,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
236236 if (Array.isArray(typ)) return transformEnum(typ, val);
237237 if (typeof typ === "object") {
238238 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
239- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
239+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
240240 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
241241 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
242242 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -235,7 +235,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
235235 if (Array.isArray(typ)) return transformEnum(typ, val);
236236 if (typeof typ === "object") {
237237 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
238- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
238+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
239239 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
240240 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
241241 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/421d4.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -249,7 +249,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
249249 if (Array.isArray(typ)) return transformEnum(typ, val);
250250 if (typeof typ === "object") {
251251 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
252- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
252+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
253253 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
254254 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
255255 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -246,7 +246,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
246246 if (Array.isArray(typ)) return transformEnum(typ, val);
247247 if (typeof typ === "object") {
248248 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
249- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
249+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
250250 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
251251 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
252252 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/437e7.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -244,7 +244,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
244244 if (Array.isArray(typ)) return transformEnum(typ, val);
245245 if (typeof typ === "object") {
246246 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
247- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
247+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
248248 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
249249 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
250250 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -239,7 +239,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
239239 if (Array.isArray(typ)) return transformEnum(typ, val);
240240 if (typeof typ === "object") {
241241 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
242- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
242+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
243243 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
244244 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
245245 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/43970.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/43eaf.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/458db.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -178,7 +178,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
178178 if (typeof typ === "object") {
179179 return typ.hasOwnProperty("uuid") ? typeof val === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(val) ? val : invalidValue(typ, val, key, parent)
180180 : typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
181- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
181+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
182182 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
183183 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
184184 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -130,7 +130,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("uuid") ? typeof val === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(val) ? val : invalidValue(typ, val, key, parent)
132132 : typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
133- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
135135 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
136136 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -177,7 +177,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
177177 if (typeof typ === "object") {
178178 return typ.hasOwnProperty("uuid") ? typeof val === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(val) ? val : invalidValue(typ, val, key, parent)
179179 : typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
180- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
180+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
181181 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
182182 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
183183 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/4961a.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/4a0d7.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/4a455.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -178,7 +178,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
178178 if (Array.isArray(typ)) return transformEnum(typ, val);
179179 if (typeof typ === "object") {
180180 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
181- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
181+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
182182 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
183183 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
184184 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -175,7 +175,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
175175 if (Array.isArray(typ)) return transformEnum(typ, val);
176176 if (typeof typ === "object") {
177177 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
178- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
178+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
179179 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
180180 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
181181 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/4c547.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -233,7 +233,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
233233 if (Array.isArray(typ)) return transformEnum(typ, val);
234234 if (typeof typ === "object") {
235235 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
236- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
236+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
237237 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
238238 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
239239 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -233,7 +233,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
233233 if (Array.isArray(typ)) return transformEnum(typ, val);
234234 if (typeof typ === "object") {
235235 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
236- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
236+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
237237 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
238238 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
239239 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/4d6fb.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -283,7 +283,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
283283 if (Array.isArray(typ)) return transformEnum(typ, val);
284284 if (typeof typ === "object") {
285285 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
286- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
286+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
287287 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
288288 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
289289 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -273,7 +273,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
273273 if (Array.isArray(typ)) return transformEnum(typ, val);
274274 if (typeof typ === "object") {
275275 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
276- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
276+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
277277 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
278278 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
279279 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/4e336.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/54147.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -151,7 +151,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
151151 if (Array.isArray(typ)) return transformEnum(typ, val);
152152 if (typeof typ === "object") {
153153 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
154- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
154+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
155155 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
156156 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
157157 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -148,7 +148,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
148148 if (Array.isArray(typ)) return transformEnum(typ, val);
149149 if (typeof typ === "object") {
150150 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
151- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
154154 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/54d32.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -157,7 +157,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
157157 if (Array.isArray(typ)) return transformEnum(typ, val);
158158 if (typeof typ === "object") {
159159 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
160- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
160+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
161161 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
162162 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
163163 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -152,7 +152,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
152152 if (Array.isArray(typ)) return transformEnum(typ, val);
153153 if (typeof typ === "object") {
154154 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
155- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
155+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
156156 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
157157 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
158158 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/570ec.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -170,7 +170,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
170170 if (Array.isArray(typ)) return transformEnum(typ, val);
171171 if (typeof typ === "object") {
172172 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
173- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
173+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
174174 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
175175 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
176176 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -167,7 +167,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
167167 if (Array.isArray(typ)) return transformEnum(typ, val);
168168 if (typeof typ === "object") {
169169 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
170- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
170+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171171 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
173173 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/5dd0d.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/5eae5.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/5eb20.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/5f3a1.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/5f7fe.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -323,7 +323,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
323323 if (Array.isArray(typ)) return transformEnum(typ, val);
324324 if (typeof typ === "object") {
325325 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
326- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
326+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
327327 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
328328 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
329329 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -320,7 +320,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
320320 if (Array.isArray(typ)) return transformEnum(typ, val);
321321 if (typeof typ === "object") {
322322 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
323- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
323+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
324324 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
325325 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
326326 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/617e8.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -322,7 +322,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
322322 if (Array.isArray(typ)) return transformEnum(typ, val);
323323 if (typeof typ === "object") {
324324 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
325- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
325+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
326326 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
327327 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
328328 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -319,7 +319,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
319319 if (Array.isArray(typ)) return transformEnum(typ, val);
320320 if (typeof typ === "object") {
321321 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
322- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
322+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
323323 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
324324 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
325325 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/61b66.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/6260a.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/65dec.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -222,7 +222,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
222222 if (Array.isArray(typ)) return transformEnum(typ, val);
223223 if (typeof typ === "object") {
224224 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
225- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
225+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
226226 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
227227 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
228228 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -198,7 +198,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
198198 if (Array.isArray(typ)) return transformEnum(typ, val);
199199 if (typeof typ === "object") {
200200 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
201- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
201+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
202202 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
203203 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
204204 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/66121.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -179,7 +179,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
179179 if (Array.isArray(typ)) return transformEnum(typ, val);
180180 if (typeof typ === "object") {
181181 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
182- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
182+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
183183 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
184184 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
185185 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -170,7 +170,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
170170 if (Array.isArray(typ)) return transformEnum(typ, val);
171171 if (typeof typ === "object") {
172172 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
173- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
173+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
174174 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
175175 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
176176 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/6617c.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/67c03.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/68c30.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -166,7 +166,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
166166 if (Array.isArray(typ)) return transformEnum(typ, val);
167167 if (typeof typ === "object") {
168168 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
169- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
169+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
170170 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
171171 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
172172 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -166,7 +166,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
166166 if (Array.isArray(typ)) return transformEnum(typ, val);
167167 if (typeof typ === "object") {
168168 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
169- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
169+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
170170 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
171171 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
172172 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/6c155.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -189,7 +189,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
189189 if (typeof typ === "object") {
190190 return typ.hasOwnProperty("uuid") ? typeof val === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(val) ? val : invalidValue(typ, val, key, parent)
191191 : typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
192- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
192+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
193193 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
194194 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
195195 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -130,7 +130,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("uuid") ? typeof val === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(val) ? val : invalidValue(typ, val, key, parent)
132132 : typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
133- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
135135 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
136136 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -189,7 +189,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
189189 if (typeof typ === "object") {
190190 return typ.hasOwnProperty("uuid") ? typeof val === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(val) ? val : invalidValue(typ, val, key, parent)
191191 : typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
192- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
192+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
193193 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
194194 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
195195 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/6de06.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -283,7 +283,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
283283 if (Array.isArray(typ)) return transformEnum(typ, val);
284284 if (typeof typ === "object") {
285285 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
286- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
286+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
287287 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
288288 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
289289 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -278,7 +278,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
278278 if (Array.isArray(typ)) return transformEnum(typ, val);
279279 if (typeof typ === "object") {
280280 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
281- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
281+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
282282 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
283283 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
284284 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/6dec6.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -238,7 +238,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
238238 if (Array.isArray(typ)) return transformEnum(typ, val);
239239 if (typeof typ === "object") {
240240 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
241- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
241+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
242242 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
243243 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
244244 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -235,7 +235,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
235235 if (Array.isArray(typ)) return transformEnum(typ, val);
236236 if (typeof typ === "object") {
237237 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
238- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
238+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
239239 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
240240 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
241241 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/6eb00.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/70c77.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/734ad.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -209,7 +209,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
209209 if (Array.isArray(typ)) return transformEnum(typ, val);
210210 if (typeof typ === "object") {
211211 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
212- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
212+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
213213 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
214214 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
215215 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -204,7 +204,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
204204 if (Array.isArray(typ)) return transformEnum(typ, val);
205205 if (typeof typ === "object") {
206206 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
207- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
207+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
208208 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
209209 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
210210 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/75912.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/7681c.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -251,7 +251,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
251251 if (Array.isArray(typ)) return transformEnum(typ, val);
252252 if (typeof typ === "object") {
253253 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
254- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
254+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
255255 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
256256 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
257257 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -243,7 +243,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
243243 if (Array.isArray(typ)) return transformEnum(typ, val);
244244 if (typeof typ === "object") {
245245 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
246- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
246+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
247247 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
248248 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
249249 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/76ae1.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -319,7 +319,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
319319 if (Array.isArray(typ)) return transformEnum(typ, val);
320320 if (typeof typ === "object") {
321321 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
322- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
322+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
323323 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
324324 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
325325 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -316,7 +316,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
316316 if (Array.isArray(typ)) return transformEnum(typ, val);
317317 if (typeof typ === "object") {
318318 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
319- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
319+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
320320 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
321321 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
322322 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/77392.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -162,7 +162,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
162162 if (Array.isArray(typ)) return transformEnum(typ, val);
163163 if (typeof typ === "object") {
164164 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
165- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
165+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
166166 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
167167 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
168168 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -150,7 +150,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
150150 if (Array.isArray(typ)) return transformEnum(typ, val);
151151 if (typeof typ === "object") {
152152 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
153- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
153+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
154154 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
155155 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
156156 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/7d397.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -210,7 +210,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
210210 if (Array.isArray(typ)) return transformEnum(typ, val);
211211 if (typeof typ === "object") {
212212 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
213- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
213+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
214214 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
215215 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
216216 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -208,7 +208,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
208208 if (Array.isArray(typ)) return transformEnum(typ, val);
209209 if (typeof typ === "object") {
210210 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
211- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
211+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
212212 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
213213 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
214214 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/7d722.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/7df41.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/7dfa6.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/7eb30.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -179,7 +179,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
179179 if (Array.isArray(typ)) return transformEnum(typ, val);
180180 if (typeof typ === "object") {
181181 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
182- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
182+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
183183 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
184184 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
185185 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -172,7 +172,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
172172 if (Array.isArray(typ)) return transformEnum(typ, val);
173173 if (typeof typ === "object") {
174174 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
175- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
175+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
176176 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
177177 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
178178 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/7f568.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -166,7 +166,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
166166 if (Array.isArray(typ)) return transformEnum(typ, val);
167167 if (typeof typ === "object") {
168168 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
169- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
169+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
170170 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
171171 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
172172 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -164,7 +164,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
164164 if (Array.isArray(typ)) return transformEnum(typ, val);
165165 if (typeof typ === "object") {
166166 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
167- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
167+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
168168 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
169169 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
170170 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/7fbfb.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -163,7 +163,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
163163 if (Array.isArray(typ)) return transformEnum(typ, val);
164164 if (typeof typ === "object") {
165165 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
166- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
166+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
167167 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
168168 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
169169 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -159,7 +159,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
159159 if (Array.isArray(typ)) return transformEnum(typ, val);
160160 if (typeof typ === "object") {
161161 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
162- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
162+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
163163 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
164164 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
165165 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/80aff.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -154,7 +154,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
154154 if (Array.isArray(typ)) return transformEnum(typ, val);
155155 if (typeof typ === "object") {
156156 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
157- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
157+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
158158 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
159159 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
160160 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -151,7 +151,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
151151 if (Array.isArray(typ)) return transformEnum(typ, val);
152152 if (typeof typ === "object") {
153153 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
154- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
154+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
155155 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
156156 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
157157 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/82509.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -135,7 +135,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
135135 if (Array.isArray(typ)) return transformEnum(typ, val);
136136 if (typeof typ === "object") {
137137 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
138- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
138+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139139 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
141141 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -135,7 +135,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
135135 if (Array.isArray(typ)) return transformEnum(typ, val);
136136 if (typeof typ === "object") {
137137 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
138- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
138+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139139 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
141141 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/8592b.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -258,7 +258,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
258258 if (Array.isArray(typ)) return transformEnum(typ, val);
259259 if (typeof typ === "object") {
260260 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
261- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
261+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
262262 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
263263 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
264264 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -247,7 +247,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
247247 if (Array.isArray(typ)) return transformEnum(typ, val);
248248 if (typeof typ === "object") {
249249 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
250- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
250+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
251251 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
252252 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
253253 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/88130.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -233,7 +233,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
233233 if (Array.isArray(typ)) return transformEnum(typ, val);
234234 if (typeof typ === "object") {
235235 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
236- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
236+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
237237 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
238238 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
239239 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -233,7 +233,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
233233 if (Array.isArray(typ)) return transformEnum(typ, val);
234234 if (typeof typ === "object") {
235235 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
236- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
236+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
237237 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
238238 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
239239 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/8a62c.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/908db.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -144,7 +144,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
144144 if (Array.isArray(typ)) return transformEnum(typ, val);
145145 if (typeof typ === "object") {
146146 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
147- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
150150 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -144,7 +144,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
144144 if (Array.isArray(typ)) return transformEnum(typ, val);
145145 if (typeof typ === "object") {
146146 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
147- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
150150 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/9617f.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/96f7c.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/9847b.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/9929c.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -233,7 +233,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
233233 if (Array.isArray(typ)) return transformEnum(typ, val);
234234 if (typeof typ === "object") {
235235 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
236- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
236+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
237237 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
238238 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
239239 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -233,7 +233,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
233233 if (Array.isArray(typ)) return transformEnum(typ, val);
234234 if (typeof typ === "object") {
235235 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
236- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
236+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
237237 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
238238 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
239239 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/996bd.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -179,7 +179,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
179179 if (Array.isArray(typ)) return transformEnum(typ, val);
180180 if (typeof typ === "object") {
181181 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
182- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
182+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
183183 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
184184 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
185185 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/9a503.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -165,7 +165,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
165165 if (Array.isArray(typ)) return transformEnum(typ, val);
166166 if (typeof typ === "object") {
167167 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
168- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
168+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
169169 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
170170 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
171171 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -162,7 +162,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
162162 if (Array.isArray(typ)) return transformEnum(typ, val);
163163 if (typeof typ === "object") {
164164 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
165- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
165+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
166166 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
167167 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
168168 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/9ac3b.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -166,7 +166,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
166166 if (Array.isArray(typ)) return transformEnum(typ, val);
167167 if (typeof typ === "object") {
168168 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
169- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
169+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
170170 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
171171 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
172172 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -159,7 +159,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
159159 if (Array.isArray(typ)) return transformEnum(typ, val);
160160 if (typeof typ === "object") {
161161 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
162- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
162+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
163163 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
164164 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
165165 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/9eed5.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -164,7 +164,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
164164 if (Array.isArray(typ)) return transformEnum(typ, val);
165165 if (typeof typ === "object") {
166166 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
167- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
167+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
168168 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
169169 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
170170 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -162,7 +162,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
162162 if (Array.isArray(typ)) return transformEnum(typ, val);
163163 if (typeof typ === "object") {
164164 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
165- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
165+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
166166 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
167167 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
168168 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/a0496.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -156,7 +156,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
156156 if (Array.isArray(typ)) return transformEnum(typ, val);
157157 if (typeof typ === "object") {
158158 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
159- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
159+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
160160 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
161161 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
162162 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -153,7 +153,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
153153 if (Array.isArray(typ)) return transformEnum(typ, val);
154154 if (typeof typ === "object") {
155155 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
156- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
156+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
157157 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
158158 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
159159 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/a1eca.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -233,7 +233,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
233233 if (Array.isArray(typ)) return transformEnum(typ, val);
234234 if (typeof typ === "object") {
235235 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
236- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
236+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
237237 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
238238 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
239239 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -233,7 +233,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
233233 if (Array.isArray(typ)) return transformEnum(typ, val);
234234 if (typeof typ === "object") {
235235 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
236- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
236+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
237237 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
238238 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
239239 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/a3d8c.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -251,7 +251,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
251251 if (Array.isArray(typ)) return transformEnum(typ, val);
252252 if (typeof typ === "object") {
253253 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
254- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
254+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
255255 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
256256 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
257257 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -245,7 +245,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
245245 if (Array.isArray(typ)) return transformEnum(typ, val);
246246 if (typeof typ === "object") {
247247 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
248- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
248+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
249249 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
250250 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
251251 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/a45b0.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -144,7 +144,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
144144 if (Array.isArray(typ)) return transformEnum(typ, val);
145145 if (typeof typ === "object") {
146146 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
147- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
150150 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/a71df.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/a9691.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/ab0d1.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -144,7 +144,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
144144 if (Array.isArray(typ)) return transformEnum(typ, val);
145145 if (typeof typ === "object") {
146146 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
147- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
150150 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/abb4b.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/ac944.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/ad8be.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -202,7 +202,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
202202 if (Array.isArray(typ)) return transformEnum(typ, val);
203203 if (typeof typ === "object") {
204204 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
205- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
205+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
206206 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
207207 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
208208 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -175,7 +175,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
175175 if (Array.isArray(typ)) return transformEnum(typ, val);
176176 if (typeof typ === "object") {
177177 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
178- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
178+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
179179 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
180180 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
181181 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/ae7f0.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -232,7 +232,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
232232 if (Array.isArray(typ)) return transformEnum(typ, val);
233233 if (typeof typ === "object") {
234234 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
235- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
235+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
236236 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
237237 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
238238 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -223,7 +223,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
223223 if (Array.isArray(typ)) return transformEnum(typ, val);
224224 if (typeof typ === "object") {
225225 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
226- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
226+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
227227 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
228228 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
229229 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/ae9ca.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -181,7 +181,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
181181 if (Array.isArray(typ)) return transformEnum(typ, val);
182182 if (typeof typ === "object") {
183183 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
184- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
184+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
185185 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
186186 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
187187 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -171,7 +171,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
171171 if (Array.isArray(typ)) return transformEnum(typ, val);
172172 if (typeof typ === "object") {
173173 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
174- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
174+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
175175 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
176176 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
177177 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/af2d1.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -243,7 +243,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
243243 if (Array.isArray(typ)) return transformEnum(typ, val);
244244 if (typeof typ === "object") {
245245 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
246- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
246+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
247247 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
248248 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
249249 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -221,7 +221,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
221221 if (Array.isArray(typ)) return transformEnum(typ, val);
222222 if (typeof typ === "object") {
223223 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
224- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
224+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
225225 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
226226 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
227227 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/b4865.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -163,7 +163,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
163163 if (Array.isArray(typ)) return transformEnum(typ, val);
164164 if (typeof typ === "object") {
165165 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
166- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
166+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
167167 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
168168 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
169169 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -159,7 +159,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
159159 if (Array.isArray(typ)) return transformEnum(typ, val);
160160 if (typeof typ === "object") {
161161 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
162- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
162+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
163163 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
164164 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
165165 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/b6f2c.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/b6fe5.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/b9f64.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -135,7 +135,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
135135 if (Array.isArray(typ)) return transformEnum(typ, val);
136136 if (typeof typ === "object") {
137137 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
138- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
138+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139139 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
141141 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -135,7 +135,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
135135 if (Array.isArray(typ)) return transformEnum(typ, val);
136136 if (typeof typ === "object") {
137137 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
138- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
138+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139139 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
141141 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/bb1ec.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/be234.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -297,7 +297,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
297297 if (Array.isArray(typ)) return transformEnum(typ, val);
298298 if (typeof typ === "object") {
299299 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
300- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
300+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
301301 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
302302 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
303303 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -284,7 +284,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
284284 if (Array.isArray(typ)) return transformEnum(typ, val);
285285 if (typeof typ === "object") {
286286 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
287- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
287+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
288288 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
289289 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
290290 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/c0356.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -147,7 +147,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
147147 if (Array.isArray(typ)) return transformEnum(typ, val);
148148 if (typeof typ === "object") {
149149 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
150- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
150+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151151 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
153153 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -147,7 +147,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
147147 if (Array.isArray(typ)) return transformEnum(typ, val);
148148 if (typeof typ === "object") {
149149 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
150- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
150+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151151 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
153153 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/c0a3a.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/c3303.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -248,7 +248,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
248248 if (Array.isArray(typ)) return transformEnum(typ, val);
249249 if (typeof typ === "object") {
250250 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
251- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
251+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
252252 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
253253 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
254254 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -242,7 +242,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
242242 if (Array.isArray(typ)) return transformEnum(typ, val);
243243 if (typeof typ === "object") {
244244 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
245- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
245+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
246246 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
247247 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
248248 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/c6cfd.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/c8c7e.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -163,7 +163,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
163163 if (Array.isArray(typ)) return transformEnum(typ, val);
164164 if (typeof typ === "object") {
165165 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
166- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
166+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
167167 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
168168 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
169169 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -159,7 +159,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
159159 if (Array.isArray(typ)) return transformEnum(typ, val);
160160 if (typeof typ === "object") {
161161 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
162- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
162+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
163163 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
164164 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
165165 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/cb0cc.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -158,7 +158,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
158158 if (Array.isArray(typ)) return transformEnum(typ, val);
159159 if (typeof typ === "object") {
160160 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
161- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
161+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
162162 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
163163 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
164164 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -152,7 +152,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
152152 if (Array.isArray(typ)) return transformEnum(typ, val);
153153 if (typeof typ === "object") {
154154 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
155- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
155+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
156156 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
157157 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
158158 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/cb81e.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -143,7 +143,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
143143 if (Array.isArray(typ)) return transformEnum(typ, val);
144144 if (typeof typ === "object") {
145145 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
146- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
149149 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -143,7 +143,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
143143 if (Array.isArray(typ)) return transformEnum(typ, val);
144144 if (typeof typ === "object") {
145145 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
146- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
149149 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/ccd18.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/cd238.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -168,7 +168,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
168168 if (Array.isArray(typ)) return transformEnum(typ, val);
169169 if (typeof typ === "object") {
170170 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
171- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
173173 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
174174 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/cd463.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/cda6c.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -163,7 +163,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
163163 if (Array.isArray(typ)) return transformEnum(typ, val);
164164 if (typeof typ === "object") {
165165 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
166- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
166+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
167167 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
168168 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
169169 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -159,7 +159,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
159159 if (Array.isArray(typ)) return transformEnum(typ, val);
160160 if (typeof typ === "object") {
161161 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
162- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
162+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
163163 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
164164 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
165165 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/cf0d8.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -233,7 +233,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
233233 if (Array.isArray(typ)) return transformEnum(typ, val);
234234 if (typeof typ === "object") {
235235 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
236- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
236+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
237237 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
238238 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
239239 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -233,7 +233,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
233233 if (Array.isArray(typ)) return transformEnum(typ, val);
234234 if (typeof typ === "object") {
235235 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
236- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
236+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
237237 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
238238 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
239239 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/cfbce.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/d0908.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/d23d5.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -153,7 +153,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
153153 if (Array.isArray(typ)) return transformEnum(typ, val);
154154 if (typeof typ === "object") {
155155 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
156- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
156+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
157157 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
158158 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
159159 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -150,7 +150,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
150150 if (Array.isArray(typ)) return transformEnum(typ, val);
151151 if (typeof typ === "object") {
152152 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
153- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
153+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
154154 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
155155 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
156156 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/dbfb3.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -237,7 +237,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
237237 if (Array.isArray(typ)) return transformEnum(typ, val);
238238 if (typeof typ === "object") {
239239 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
240- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
240+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
241241 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
242242 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
243243 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -235,7 +235,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
235235 if (Array.isArray(typ)) return transformEnum(typ, val);
236236 if (typeof typ === "object") {
237237 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
238- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
238+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
239239 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
240240 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
241241 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/dc44f.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -261,7 +261,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
261261 if (Array.isArray(typ)) return transformEnum(typ, val);
262262 if (typeof typ === "object") {
263263 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
264- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
264+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
265265 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
266266 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
267267 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -203,7 +203,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
203203 if (Array.isArray(typ)) return transformEnum(typ, val);
204204 if (typeof typ === "object") {
205205 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
206- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
206+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
207207 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
208208 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
209209 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/dd1ce.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -261,7 +261,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
261261 if (Array.isArray(typ)) return transformEnum(typ, val);
262262 if (typeof typ === "object") {
263263 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
264- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
264+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
265265 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
266266 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
267267 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -203,7 +203,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
203203 if (Array.isArray(typ)) return transformEnum(typ, val);
204204 if (typeof typ === "object") {
205205 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
206- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
206+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
207207 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
208208 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
209209 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/dec3a.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -197,7 +197,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
197197 if (typeof typ === "object") {
198198 return typ.hasOwnProperty("uuid") ? typeof val === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(val) ? val : invalidValue(typ, val, key, parent)
199199 : typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
200- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
200+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
201201 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
202202 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
203203 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -130,7 +130,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("uuid") ? typeof val === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(val) ? val : invalidValue(typ, val, key, parent)
132132 : typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
133- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
135135 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
136136 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -197,7 +197,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
197197 if (typeof typ === "object") {
198198 return typ.hasOwnProperty("uuid") ? typeof val === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(val) ? val : invalidValue(typ, val, key, parent)
199199 : typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
200- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
200+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
201201 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
202202 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
203203 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/df957.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -233,7 +233,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
233233 if (Array.isArray(typ)) return transformEnum(typ, val);
234234 if (typeof typ === "object") {
235235 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
236- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
236+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
237237 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
238238 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
239239 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -233,7 +233,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
233233 if (Array.isArray(typ)) return transformEnum(typ, val);
234234 if (typeof typ === "object") {
235235 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
236- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
236+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
237237 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
238238 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
239239 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/e0ac7.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -245,7 +245,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
245245 if (Array.isArray(typ)) return transformEnum(typ, val);
246246 if (typeof typ === "object") {
247247 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
248- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
248+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
249249 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
250250 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
251251 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -241,7 +241,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
241241 if (Array.isArray(typ)) return transformEnum(typ, val);
242242 if (typeof typ === "object") {
243243 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
244- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
244+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
245245 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
246246 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
247247 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/e2915.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -236,7 +236,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
236236 if (Array.isArray(typ)) return transformEnum(typ, val);
237237 if (typeof typ === "object") {
238238 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
239- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
239+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
240240 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
241241 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
242242 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -235,7 +235,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
235235 if (Array.isArray(typ)) return transformEnum(typ, val);
236236 if (typeof typ === "object") {
237237 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
238- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
238+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
239239 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
240240 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
241241 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/e2a58.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/e324e.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -207,7 +207,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
207207 if (Array.isArray(typ)) return transformEnum(typ, val);
208208 if (typeof typ === "object") {
209209 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
210- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
210+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
211211 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
212212 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
213213 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -206,7 +206,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
206206 if (Array.isArray(typ)) return transformEnum(typ, val);
207207 if (typeof typ === "object") {
208208 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
209- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
209+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
210210 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
211211 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
212212 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/e53b5.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -163,7 +163,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
163163 if (Array.isArray(typ)) return transformEnum(typ, val);
164164 if (typeof typ === "object") {
165165 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
166- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
166+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
167167 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
168168 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
169169 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -159,7 +159,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
159159 if (Array.isArray(typ)) return transformEnum(typ, val);
160160 if (typeof typ === "object") {
161161 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
162- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
162+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
163163 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
164164 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
165165 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/e64a0.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -148,7 +148,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
148148 if (Array.isArray(typ)) return transformEnum(typ, val);
149149 if (typeof typ === "object") {
150150 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
151- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
154154 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/e8a0b.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -144,7 +144,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
144144 if (Array.isArray(typ)) return transformEnum(typ, val);
145145 if (typeof typ === "object") {
146146 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
147- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
150150 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/e8b04.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -405,7 +405,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
405405 if (Array.isArray(typ)) return transformEnum(typ, val);
406406 if (typeof typ === "object") {
407407 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
408- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
408+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
409409 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
410410 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
411411 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -366,7 +366,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
366366 if (Array.isArray(typ)) return transformEnum(typ, val);
367367 if (typeof typ === "object") {
368368 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
369- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
369+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
370370 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
371371 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
372372 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/ed095.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -133,7 +133,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
133133 if (Array.isArray(typ)) return transformEnum(typ, val);
134134 if (typeof typ === "object") {
135135 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
136- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
136+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
137137 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
138138 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
139139 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -133,7 +133,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
133133 if (Array.isArray(typ)) return transformEnum(typ, val);
134134 if (typeof typ === "object") {
135135 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
136- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
136+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
137137 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
138138 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
139139 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/f22f5.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -229,7 +229,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
229229 if (Array.isArray(typ)) return transformEnum(typ, val);
230230 if (typeof typ === "object") {
231231 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
232- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
232+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
233233 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
234234 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
235235 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -221,7 +221,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
221221 if (Array.isArray(typ)) return transformEnum(typ, val);
222222 if (typeof typ === "object") {
223223 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
224- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
224+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
225225 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
226226 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
227227 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/f3139.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/f3edf.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -144,7 +144,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
144144 if (Array.isArray(typ)) return transformEnum(typ, val);
145145 if (typeof typ === "object") {
146146 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
147- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
150150 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/f466a.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -144,7 +144,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
144144 if (Array.isArray(typ)) return transformEnum(typ, val);
145145 if (typeof typ === "object") {
146146 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
147- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
150150 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/f6a65.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -252,7 +252,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
252252 if (Array.isArray(typ)) return transformEnum(typ, val);
253253 if (typeof typ === "object") {
254254 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
255- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
255+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
256256 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
257257 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
258258 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -243,7 +243,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
243243 if (Array.isArray(typ)) return transformEnum(typ, val);
244244 if (typeof typ === "object") {
245245 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
246- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
246+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
247247 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
248248 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
249249 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/f74d5.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -251,7 +251,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
251251 if (Array.isArray(typ)) return transformEnum(typ, val);
252252 if (typeof typ === "object") {
253253 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
254- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
254+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
255255 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
256256 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
257257 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -245,7 +245,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
245245 if (Array.isArray(typ)) return transformEnum(typ, val);
246246 if (typeof typ === "object") {
247247 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
248- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
248+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
249249 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
250250 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
251251 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/f82d9.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -220,7 +220,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
220220 if (Array.isArray(typ)) return transformEnum(typ, val);
221221 if (typeof typ === "object") {
222222 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
223- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
223+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
224224 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
225225 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
226226 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -219,7 +219,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
219219 if (Array.isArray(typ)) return transformEnum(typ, val);
220220 if (typeof typ === "object") {
221221 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
222- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
222+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
223223 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
224224 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
225225 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/f974d.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/faff5.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/fcca3.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -348,7 +348,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
348348 if (Array.isArray(typ)) return transformEnum(typ, val);
349349 if (typeof typ === "object") {
350350 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
351- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
351+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
352352 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
353353 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
354354 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -345,7 +345,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
345345 if (Array.isArray(typ)) return transformEnum(typ, val);
346346 if (typeof typ === "object") {
347347 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
348- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
348+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
349349 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
350350 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
351351 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/misc/fd329.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -148,7 +148,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
148148 if (Array.isArray(typ)) return transformEnum(typ, val);
149149 if (typeof typ === "object") {
150150 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
151- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
154154 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -148,7 +148,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
148148 if (Array.isArray(typ)) return transformEnum(typ, val);
149149 if (typeof typ === "object") {
150150 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
151- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
154154 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/blns-object.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -730,7 +730,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
730730 if (Array.isArray(typ)) return transformEnum(typ, val);
731731 if (typeof typ === "object") {
732732 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
733- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
733+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
734734 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
735735 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
736736 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -730,7 +730,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
730730 if (Array.isArray(typ)) return transformEnum(typ, val);
731731 if (typeof typ === "object") {
732732 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
733- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
733+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
734734 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
735735 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
736736 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/bug2037.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -146,7 +146,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
146146 if (Array.isArray(typ)) return transformEnum(typ, val);
147147 if (typeof typ === "object") {
148148 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
149- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
151151 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
152152 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -143,7 +143,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
143143 if (Array.isArray(typ)) return transformEnum(typ, val);
144144 if (typeof typ === "object") {
145145 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
146- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
149149 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/bug2521.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/bug2590.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (Array.isArray(typ)) return transformEnum(typ, val);
142142 if (typeof typ === "object") {
143143 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (Array.isArray(typ)) return transformEnum(typ, val);
142142 if (typeof typ === "object") {
143143 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/bug2663.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/bug2793.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -144,7 +144,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
144144 if (Array.isArray(typ)) return transformEnum(typ, val);
145145 if (typeof typ === "object") {
146146 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
147- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
150150 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (Array.isArray(typ)) return transformEnum(typ, val);
142142 if (typeof typ === "object") {
143143 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/bug427.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -746,7 +746,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
746746 if (Array.isArray(typ)) return transformEnum(typ, val);
747747 if (typeof typ === "object") {
748748 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
749- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
749+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
750750 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
751751 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
752752 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -692,7 +692,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
692692 if (Array.isArray(typ)) return transformEnum(typ, val);
693693 if (typeof typ === "object") {
694694 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
695- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
695+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
696696 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
697697 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
698698 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/bug790.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/bug855-short.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/bug863.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -221,7 +221,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
221221 if (Array.isArray(typ)) return transformEnum(typ, val);
222222 if (typeof typ === "object") {
223223 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
224- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
224+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
225225 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
226226 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
227227 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -205,7 +205,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
205205 if (Array.isArray(typ)) return transformEnum(typ, val);
206206 if (typeof typ === "object") {
207207 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
208- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
208+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
209209 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
210210 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
211211 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/coin-pairs.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -147,7 +147,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
147147 if (Array.isArray(typ)) return transformEnum(typ, val);
148148 if (typeof typ === "object") {
149149 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
150- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
150+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151151 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
153153 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -147,7 +147,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
147147 if (Array.isArray(typ)) return transformEnum(typ, val);
148148 if (typeof typ === "object") {
149149 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
150- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
150+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151151 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
153153 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/combinations1.json

16 generated files · +16 −16
Mflowdefault / TopLevel.js+1 −1
@@ -527,7 +527,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
527527 if (Array.isArray(typ)) return transformEnum(typ, val);
528528 if (typeof typ === "object") {
529529 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
530- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
530+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
531531 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
532532 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
533533 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mflownice-property-names-true--f4d7920ee2ce / TopLevel.js+1 −1
@@ -527,7 +527,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
527527 if (Array.isArray(typ)) return transformEnum(typ, val);
528528 if (typeof typ === "object") {
529529 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
530- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
530+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
531531 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
532532 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
533533 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mflowprefer-unions-false--a5053c0a486d / TopLevel.js+1 −1
@@ -527,7 +527,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
527527 if (Array.isArray(typ)) return transformEnum(typ, val);
528528 if (typeof typ === "object") {
529529 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
530- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
530+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
531531 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
532532 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
533533 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mflowprefer-unknown-false--f1ab9e45d823 / TopLevel.js+1 −1
@@ -527,7 +527,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
527527 if (Array.isArray(typ)) return transformEnum(typ, val);
528528 if (typeof typ === "object") {
529529 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
530- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
530+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
531531 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
532532 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
533533 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mflowruntime-typecheck-ignore-unknown-properties-true--d792c40f022e / TopLevel.js+1 −1
@@ -527,7 +527,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
527527 if (Array.isArray(typ)) return transformEnum(typ, val);
528528 if (typeof typ === "object") {
529529 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
530- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
530+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
531531 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
532532 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
533533 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptconverters-top-level--67aa452ed509 / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptruntime-typecheck-ignore-unknown-properties-true--d792c40f022e / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptacronym-style-pascal--d9e0c1bd777a / TopLevel.ts+1 −1
@@ -527,7 +527,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
527527 if (Array.isArray(typ)) return transformEnum(typ, val);
528528 if (typeof typ === "object") {
529529 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
530- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
530+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
531531 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
532532 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
533533 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptconverters-all-objects--3a443babd1cb / TopLevel.ts+1 −1
@@ -631,7 +631,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
631631 if (Array.isArray(typ)) return transformEnum(typ, val);
632632 if (typeof typ === "object") {
633633 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
634- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
634+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
635635 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
636636 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
637637 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -527,7 +527,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
527527 if (Array.isArray(typ)) return transformEnum(typ, val);
528528 if (typeof typ === "object") {
529529 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
530- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
530+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
531531 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
532532 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
533533 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptnice-property-names-true--f4d7920ee2ce / TopLevel.ts+1 −1
@@ -527,7 +527,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
527527 if (Array.isArray(typ)) return transformEnum(typ, val);
528528 if (typeof typ === "object") {
529529 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
530- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
530+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
531531 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
532532 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
533533 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptprefer-unions-false--a5053c0a486d / TopLevel.ts+1 −1
@@ -527,7 +527,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
527527 if (Array.isArray(typ)) return transformEnum(typ, val);
528528 if (typeof typ === "object") {
529529 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
530- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
530+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
531531 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
532532 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
533533 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptprefer-unknown-false--f1ab9e45d823 / TopLevel.ts+1 −1
@@ -527,7 +527,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
527527 if (Array.isArray(typ)) return transformEnum(typ, val);
528528 if (typeof typ === "object") {
529529 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
530- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
530+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
531531 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
532532 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
533533 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptreadonly-true--24da4fc107df / TopLevel.ts+1 −1
@@ -527,7 +527,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
527527 if (Array.isArray(typ)) return transformEnum(typ, val);
528528 if (typeof typ === "object") {
529529 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
530- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
530+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
531531 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
532532 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
533533 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptruntime-typecheck-ignore-unknown-properties-true--d792c40f022e / TopLevel.ts+1 −1
@@ -527,7 +527,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
527527 if (Array.isArray(typ)) return transformEnum(typ, val);
528528 if (typeof typ === "object") {
529529 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
530- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
530+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
531531 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
532532 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
533533 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/combinations2.json

16 generated files · +16 −16
Mflowdefault / TopLevel.js+1 −1
@@ -479,7 +479,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
479479 if (Array.isArray(typ)) return transformEnum(typ, val);
480480 if (typeof typ === "object") {
481481 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
482- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
482+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
483483 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
484484 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
485485 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mflownice-property-names-true--f4d7920ee2ce / TopLevel.js+1 −1
@@ -479,7 +479,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
479479 if (Array.isArray(typ)) return transformEnum(typ, val);
480480 if (typeof typ === "object") {
481481 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
482- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
482+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
483483 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
484484 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
485485 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mflowprefer-unions-false--a5053c0a486d / TopLevel.js+1 −1
@@ -479,7 +479,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
479479 if (Array.isArray(typ)) return transformEnum(typ, val);
480480 if (typeof typ === "object") {
481481 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
482- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
482+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
483483 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
484484 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
485485 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mflowprefer-unknown-false--f1ab9e45d823 / TopLevel.js+1 −1
@@ -479,7 +479,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
479479 if (Array.isArray(typ)) return transformEnum(typ, val);
480480 if (typeof typ === "object") {
481481 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
482- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
482+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
483483 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
484484 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
485485 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mflowruntime-typecheck-ignore-unknown-properties-true--d792c40f022e / TopLevel.js+1 −1
@@ -479,7 +479,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
479479 if (Array.isArray(typ)) return transformEnum(typ, val);
480480 if (typeof typ === "object") {
481481 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
482- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
482+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
483483 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
484484 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
485485 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptconverters-top-level--67aa452ed509 / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptruntime-typecheck-ignore-unknown-properties-true--d792c40f022e / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptacronym-style-pascal--d9e0c1bd777a / TopLevel.ts+1 −1
@@ -479,7 +479,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
479479 if (Array.isArray(typ)) return transformEnum(typ, val);
480480 if (typeof typ === "object") {
481481 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
482- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
482+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
483483 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
484484 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
485485 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptconverters-all-objects--3a443babd1cb / TopLevel.ts+1 −1
@@ -559,7 +559,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
559559 if (Array.isArray(typ)) return transformEnum(typ, val);
560560 if (typeof typ === "object") {
561561 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
562- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
562+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
563563 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
564564 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
565565 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -479,7 +479,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
479479 if (Array.isArray(typ)) return transformEnum(typ, val);
480480 if (typeof typ === "object") {
481481 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
482- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
482+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
483483 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
484484 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
485485 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptnice-property-names-true--f4d7920ee2ce / TopLevel.ts+1 −1
@@ -479,7 +479,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
479479 if (Array.isArray(typ)) return transformEnum(typ, val);
480480 if (typeof typ === "object") {
481481 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
482- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
482+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
483483 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
484484 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
485485 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptprefer-unions-false--a5053c0a486d / TopLevel.ts+1 −1
@@ -479,7 +479,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
479479 if (Array.isArray(typ)) return transformEnum(typ, val);
480480 if (typeof typ === "object") {
481481 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
482- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
482+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
483483 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
484484 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
485485 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptprefer-unknown-false--f1ab9e45d823 / TopLevel.ts+1 −1
@@ -479,7 +479,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
479479 if (Array.isArray(typ)) return transformEnum(typ, val);
480480 if (typeof typ === "object") {
481481 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
482- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
482+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
483483 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
484484 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
485485 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptreadonly-true--24da4fc107df / TopLevel.ts+1 −1
@@ -479,7 +479,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
479479 if (Array.isArray(typ)) return transformEnum(typ, val);
480480 if (typeof typ === "object") {
481481 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
482- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
482+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
483483 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
484484 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
485485 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptruntime-typecheck-ignore-unknown-properties-true--d792c40f022e / TopLevel.ts+1 −1
@@ -479,7 +479,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
479479 if (Array.isArray(typ)) return transformEnum(typ, val);
480480 if (typeof typ === "object") {
481481 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
482- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
482+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
483483 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
484484 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
485485 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/combinations3.json

16 generated files · +16 −16
Mflowdefault / TopLevel.js+1 −1
@@ -583,7 +583,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
583583 if (Array.isArray(typ)) return transformEnum(typ, val);
584584 if (typeof typ === "object") {
585585 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
586- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
586+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
587587 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
588588 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
589589 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mflownice-property-names-true--f4d7920ee2ce / TopLevel.js+1 −1
@@ -583,7 +583,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
583583 if (Array.isArray(typ)) return transformEnum(typ, val);
584584 if (typeof typ === "object") {
585585 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
586- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
586+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
587587 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
588588 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
589589 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mflowprefer-unions-false--a5053c0a486d / TopLevel.js+1 −1
@@ -583,7 +583,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
583583 if (Array.isArray(typ)) return transformEnum(typ, val);
584584 if (typeof typ === "object") {
585585 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
586- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
586+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
587587 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
588588 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
589589 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mflowprefer-unknown-false--f1ab9e45d823 / TopLevel.js+1 −1
@@ -583,7 +583,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
583583 if (Array.isArray(typ)) return transformEnum(typ, val);
584584 if (typeof typ === "object") {
585585 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
586- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
586+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
587587 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
588588 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
589589 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mflowruntime-typecheck-ignore-unknown-properties-true--d792c40f022e / TopLevel.js+1 −1
@@ -583,7 +583,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
583583 if (Array.isArray(typ)) return transformEnum(typ, val);
584584 if (typeof typ === "object") {
585585 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
586- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
586+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
587587 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
588588 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
589589 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptconverters-top-level--67aa452ed509 / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptruntime-typecheck-ignore-unknown-properties-true--d792c40f022e / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptacronym-style-pascal--d9e0c1bd777a / TopLevel.ts+1 −1
@@ -583,7 +583,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
583583 if (Array.isArray(typ)) return transformEnum(typ, val);
584584 if (typeof typ === "object") {
585585 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
586- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
586+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
587587 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
588588 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
589589 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptconverters-all-objects--3a443babd1cb / TopLevel.ts+1 −1
@@ -695,7 +695,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
695695 if (Array.isArray(typ)) return transformEnum(typ, val);
696696 if (typeof typ === "object") {
697697 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
698- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
698+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
699699 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
700700 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
701701 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -583,7 +583,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
583583 if (Array.isArray(typ)) return transformEnum(typ, val);
584584 if (typeof typ === "object") {
585585 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
586- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
586+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
587587 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
588588 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
589589 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptnice-property-names-true--f4d7920ee2ce / TopLevel.ts+1 −1
@@ -583,7 +583,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
583583 if (Array.isArray(typ)) return transformEnum(typ, val);
584584 if (typeof typ === "object") {
585585 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
586- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
586+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
587587 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
588588 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
589589 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptprefer-unions-false--a5053c0a486d / TopLevel.ts+1 −1
@@ -583,7 +583,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
583583 if (Array.isArray(typ)) return transformEnum(typ, val);
584584 if (typeof typ === "object") {
585585 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
586- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
586+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
587587 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
588588 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
589589 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptprefer-unknown-false--f1ab9e45d823 / TopLevel.ts+1 −1
@@ -583,7 +583,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
583583 if (Array.isArray(typ)) return transformEnum(typ, val);
584584 if (typeof typ === "object") {
585585 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
586- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
586+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
587587 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
588588 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
589589 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptreadonly-true--24da4fc107df / TopLevel.ts+1 −1
@@ -583,7 +583,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
583583 if (Array.isArray(typ)) return transformEnum(typ, val);
584584 if (typeof typ === "object") {
585585 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
586- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
586+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
587587 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
588588 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
589589 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptruntime-typecheck-ignore-unknown-properties-true--d792c40f022e / TopLevel.ts+1 −1
@@ -583,7 +583,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
583583 if (Array.isArray(typ)) return transformEnum(typ, val);
584584 if (typeof typ === "object") {
585585 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
586- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
586+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
587587 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
588588 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
589589 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/combinations4.json

16 generated files · +16 −16
Mflowdefault / TopLevel.js+1 −1
@@ -653,7 +653,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
653653 if (Array.isArray(typ)) return transformEnum(typ, val);
654654 if (typeof typ === "object") {
655655 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
656- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
656+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
657657 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
658658 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
659659 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mflownice-property-names-true--f4d7920ee2ce / TopLevel.js+1 −1
@@ -653,7 +653,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
653653 if (Array.isArray(typ)) return transformEnum(typ, val);
654654 if (typeof typ === "object") {
655655 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
656- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
656+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
657657 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
658658 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
659659 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mflowprefer-unions-false--a5053c0a486d / TopLevel.js+1 −1
@@ -653,7 +653,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
653653 if (Array.isArray(typ)) return transformEnum(typ, val);
654654 if (typeof typ === "object") {
655655 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
656- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
656+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
657657 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
658658 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
659659 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mflowprefer-unknown-false--f1ab9e45d823 / TopLevel.js+1 −1
@@ -653,7 +653,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
653653 if (Array.isArray(typ)) return transformEnum(typ, val);
654654 if (typeof typ === "object") {
655655 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
656- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
656+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
657657 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
658658 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
659659 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mflowruntime-typecheck-ignore-unknown-properties-true--d792c40f022e / TopLevel.js+1 −1
@@ -653,7 +653,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
653653 if (Array.isArray(typ)) return transformEnum(typ, val);
654654 if (typeof typ === "object") {
655655 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
656- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
656+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
657657 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
658658 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
659659 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptconverters-top-level--67aa452ed509 / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptruntime-typecheck-ignore-unknown-properties-true--d792c40f022e / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptacronym-style-pascal--d9e0c1bd777a / TopLevel.ts+1 −1
@@ -653,7 +653,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
653653 if (Array.isArray(typ)) return transformEnum(typ, val);
654654 if (typeof typ === "object") {
655655 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
656- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
656+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
657657 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
658658 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
659659 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptconverters-all-objects--3a443babd1cb / TopLevel.ts+1 −1
@@ -781,7 +781,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
781781 if (Array.isArray(typ)) return transformEnum(typ, val);
782782 if (typeof typ === "object") {
783783 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
784- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
784+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
785785 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
786786 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
787787 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -653,7 +653,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
653653 if (Array.isArray(typ)) return transformEnum(typ, val);
654654 if (typeof typ === "object") {
655655 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
656- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
656+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
657657 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
658658 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
659659 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptnice-property-names-true--f4d7920ee2ce / TopLevel.ts+1 −1
@@ -653,7 +653,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
653653 if (Array.isArray(typ)) return transformEnum(typ, val);
654654 if (typeof typ === "object") {
655655 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
656- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
656+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
657657 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
658658 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
659659 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptprefer-unions-false--a5053c0a486d / TopLevel.ts+1 −1
@@ -653,7 +653,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
653653 if (Array.isArray(typ)) return transformEnum(typ, val);
654654 if (typeof typ === "object") {
655655 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
656- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
656+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
657657 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
658658 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
659659 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptprefer-unknown-false--f1ab9e45d823 / TopLevel.ts+1 −1
@@ -653,7 +653,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
653653 if (Array.isArray(typ)) return transformEnum(typ, val);
654654 if (typeof typ === "object") {
655655 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
656- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
656+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
657657 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
658658 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
659659 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptreadonly-true--24da4fc107df / TopLevel.ts+1 −1
@@ -653,7 +653,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
653653 if (Array.isArray(typ)) return transformEnum(typ, val);
654654 if (typeof typ === "object") {
655655 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
656- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
656+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
657657 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
658658 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
659659 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptruntime-typecheck-ignore-unknown-properties-true--d792c40f022e / TopLevel.ts+1 −1
@@ -653,7 +653,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
653653 if (Array.isArray(typ)) return transformEnum(typ, val);
654654 if (typeof typ === "object") {
655655 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
656- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
656+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
657657 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
658658 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
659659 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/combined-enum.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/direct-recursive.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/empty-enum.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/identifiers.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -166,7 +166,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
166166 if (Array.isArray(typ)) return transformEnum(typ, val);
167167 if (typeof typ === "object") {
168168 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
169- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
169+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
170170 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
171171 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
172172 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -163,7 +163,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
163163 if (Array.isArray(typ)) return transformEnum(typ, val);
164164 if (typeof typ === "object") {
165165 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
166- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
166+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
167167 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
168168 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
169169 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/issue2680-object-array.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/issue2680-scalar-array.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -133,7 +133,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
133133 if (Array.isArray(typ)) return transformEnum(typ, val);
134134 if (typeof typ === "object") {
135135 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
136- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
136+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
137137 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
138138 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
139139 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -133,7 +133,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
133133 if (Array.isArray(typ)) return transformEnum(typ, val);
134134 if (typeof typ === "object") {
135135 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
136- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
136+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
137137 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
138138 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
139139 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/keywords.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -1555,7 +1555,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
15551555 if (Array.isArray(typ)) return transformEnum(typ, val);
15561556 if (typeof typ === "object") {
15571557 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
1558- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
1558+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
15591559 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
15601560 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
15611561 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -1555,7 +1555,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
15551555 if (Array.isArray(typ)) return transformEnum(typ, val);
15561556 if (typeof typ === "object") {
15571557 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
1558- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
1558+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
15591559 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
15601560 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
15611561 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/kotlin-enum-class-case-collision.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (Array.isArray(typ)) return transformEnum(typ, val);
142142 if (typeof typ === "object") {
143143 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/list.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/name-style.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (Array.isArray(typ)) return transformEnum(typ, val);
142142 if (typeof typ === "object") {
143143 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (Array.isArray(typ)) return transformEnum(typ, val);
142142 if (typeof typ === "object") {
143143 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/nbl-stats.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -467,7 +467,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
467467 if (Array.isArray(typ)) return transformEnum(typ, val);
468468 if (typeof typ === "object") {
469469 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
470- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
470+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
471471 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
472472 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
473473 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -412,7 +412,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
412412 if (Array.isArray(typ)) return transformEnum(typ, val);
413413 if (typeof typ === "object") {
414414 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
415- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
415+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
416416 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
417417 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
418418 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/nested-objects.json

4 generated files · +4 −4
Mflowdefault / TopLevel.js+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptconverters-all-objects--3a443babd1cb / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/no-classes.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -133,7 +133,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
133133 if (Array.isArray(typ)) return transformEnum(typ, val);
134134 if (typeof typ === "object") {
135135 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
136- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
136+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
137137 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
138138 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
139139 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -133,7 +133,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
133133 if (Array.isArray(typ)) return transformEnum(typ, val);
134134 if (typeof typ === "object") {
135135 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
136- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
136+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
137137 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
138138 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
139139 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/nst-test-suite.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -275,7 +275,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
275275 if (Array.isArray(typ)) return transformEnum(typ, val);
276276 if (typeof typ === "object") {
277277 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
278- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
278+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
279279 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
280280 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
281281 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -272,7 +272,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
272272 if (Array.isArray(typ)) return transformEnum(typ, val);
273273 if (typeof typ === "object") {
274274 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
275- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
275+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
276276 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
277277 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
278278 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/number-map.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -135,7 +135,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
135135 if (Array.isArray(typ)) return transformEnum(typ, val);
136136 if (typeof typ === "object") {
137137 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
138- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
138+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139139 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
141141 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -135,7 +135,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
135135 if (Array.isArray(typ)) return transformEnum(typ, val);
136136 if (typeof typ === "object") {
137137 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
138- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
138+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139139 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
141141 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/omit-empty.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/optional-union.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/php-mixed-union.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (Array.isArray(typ)) return transformEnum(typ, val);
142142 if (typeof typ === "object") {
143143 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (Array.isArray(typ)) return transformEnum(typ, val);
142142 if (typeof typ === "object") {
143143 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/php-validation.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/recursive.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -254,7 +254,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
254254 if (Array.isArray(typ)) return transformEnum(typ, val);
255255 if (typeof typ === "object") {
256256 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
257- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
257+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
258258 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
259259 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
260260 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -254,7 +254,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
254254 if (Array.isArray(typ)) return transformEnum(typ, val);
255255 if (typeof typ === "object") {
256256 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
257- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
257+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
258258 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
259259 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
260260 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/simple-identifiers.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -143,7 +143,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
143143 if (Array.isArray(typ)) return transformEnum(typ, val);
144144 if (typeof typ === "object") {
145145 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
146- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
149149 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -143,7 +143,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
143143 if (Array.isArray(typ)) return transformEnum(typ, val);
144144 if (typeof typ === "object") {
145145 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
146- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
149149 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/union-constructor-clash.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/unions.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/url.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/priority/uuids.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("uuid") ? typeof val === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(val) ? val : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -130,7 +130,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("uuid") ? typeof val === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(val) ? val : invalidValue(typ, val, key, parent)
132132 : typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
133- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
135135 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
136136 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("uuid") ? typeof val === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(val) ? val : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/samples/bitcoin-block.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/samples/getting-started.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/samples/github-events.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -423,7 +423,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
423423 if (Array.isArray(typ)) return transformEnum(typ, val);
424424 if (typeof typ === "object") {
425425 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
426- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
426+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
427427 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
428428 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
429429 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -421,7 +421,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
421421 if (Array.isArray(typ)) return transformEnum(typ, val);
422422 if (typeof typ === "object") {
423423 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
424- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
424+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
425425 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
426426 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
427427 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/samples/kitchen-sink.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -167,7 +167,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
167167 if (Array.isArray(typ)) return transformEnum(typ, val);
168168 if (typeof typ === "object") {
169169 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
170- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
170+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171171 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
173173 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -167,7 +167,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
167167 if (Array.isArray(typ)) return transformEnum(typ, val);
168168 if (typeof typ === "object") {
169169 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
170- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
170+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
171171 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
172172 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
173173 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/samples/null-safe.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -148,7 +148,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
148148 if (Array.isArray(typ)) return transformEnum(typ, val);
149149 if (typeof typ === "object") {
150150 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
151- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
154154 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -148,7 +148,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
148148 if (Array.isArray(typ)) return transformEnum(typ, val);
149149 if (typeof typ === "object") {
150150 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
151- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
154154 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/samples/pokedex.json

4 generated files · +4 −4
Mflowdefault / TopLevel.js+1 −1
@@ -187,7 +187,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
187187 if (Array.isArray(typ)) return transformEnum(typ, val);
188188 if (typeof typ === "object") {
189189 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
190- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
190+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
191191 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
192192 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
193193 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -164,7 +164,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
164164 if (Array.isArray(typ)) return transformEnum(typ, val);
165165 if (typeof typ === "object") {
166166 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
167- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
167+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
168168 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
169169 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
170170 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptprefer-types-true--df33e18681f9 / TopLevel.ts+1 −1
@@ -164,7 +164,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
164164 if (Array.isArray(typ)) return transformEnum(typ, val);
165165 if (typeof typ === "object") {
166166 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
167- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
167+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
168168 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
169169 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
170170 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/samples/reddit.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -276,7 +276,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
276276 if (Array.isArray(typ)) return transformEnum(typ, val);
277277 if (typeof typ === "object") {
278278 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
279- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
279+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
280280 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
281281 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
282282 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -261,7 +261,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
261261 if (Array.isArray(typ)) return transformEnum(typ, val);
262262 if (typeof typ === "object") {
263263 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
264- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
264+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
265265 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
266266 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
267267 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/samples/simple-object.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/samples/spotify-album.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -205,7 +205,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
205205 if (Array.isArray(typ)) return transformEnum(typ, val);
206206 if (typeof typ === "object") {
207207 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
208- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
208+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
209209 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
210210 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
211211 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -205,7 +205,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
205205 if (Array.isArray(typ)) return transformEnum(typ, val);
206206 if (typeof typ === "object") {
207207 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
208- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
208+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
209209 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
210210 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
211211 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/samples/us-avg-temperatures.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -148,7 +148,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
148148 if (Array.isArray(typ)) return transformEnum(typ, val);
149149 if (typeof typ === "object") {
150150 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
151- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
154154 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -148,7 +148,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
148148 if (Array.isArray(typ)) return transformEnum(typ, val);
149149 if (typeof typ === "object") {
150150 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
151- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
154154 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/json/samples/us-senators.json

3 generated files · +3 −3
Mflowdefault / TopLevel.js+1 −1
@@ -240,7 +240,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
240240 if (Array.isArray(typ)) return transformEnum(typ, val);
241241 if (typeof typ === "object") {
242242 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
243- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
243+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
244244 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
245245 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
246246 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mjavascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mtypescriptdefault / TopLevel.ts+1 −1
@@ -217,7 +217,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
217217 if (Array.isArray(typ)) return transformEnum(typ, val);
218218 if (typeof typ === "object") {
219219 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
220- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
220+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
221221 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
222222 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
223223 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/accessors.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/all-of-additional-properties-false.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -147,7 +147,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
147147 if (Array.isArray(typ)) return transformEnum(typ, val);
148148 if (typeof typ === "object") {
149149 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
150- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
150+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151151 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
153153 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/any.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/bool-string.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -144,7 +144,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
144144 if (Array.isArray(typ)) return transformEnum(typ, val);
145145 if (typeof typ === "object") {
146146 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
147- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
150150 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -144,7 +144,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
144144 if (Array.isArray(typ)) return transformEnum(typ, val);
145145 if (typeof typ === "object") {
146146 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
147- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
150150 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/boolean-subschema.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/camelCase.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/class-map-union.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -152,7 +152,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
152152 if (Array.isArray(typ)) return transformEnum(typ, val);
153153 if (typeof typ === "object") {
154154 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
155- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
155+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
156156 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
157157 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
158158 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -152,7 +152,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
152152 if (Array.isArray(typ)) return transformEnum(typ, val);
153153 if (typeof typ === "object") {
154154 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
155- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
155+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
156156 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
157157 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
158158 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/class-with-additional.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/comment-injection-enum-nested-comment.schema

4 generated files · +4 −4
Mcomment-injection-typescriptdefault / TopLevel.ts+1 −1
@@ -149,7 +149,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
149149 if (Array.isArray(typ)) return transformEnum(typ, val);
150150 if (typeof typ === "object") {
151151 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
152- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
154154 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
155155 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-flowdefault / TopLevel.js+1 −1
@@ -150,7 +150,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
150150 if (Array.isArray(typ)) return transformEnum(typ, val);
151151 if (typeof typ === "object") {
152152 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
153- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
153+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
154154 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
155155 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
156156 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -149,7 +149,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
149149 if (Array.isArray(typ)) return transformEnum(typ, val);
150150 if (typeof typ === "object") {
151151 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
152- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
154154 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
155155 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/comment-injection-enum.schema

4 generated files · +4 −4
Mcomment-injection-typescriptdefault / TopLevel.ts+1 −1
@@ -155,7 +155,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
155155 if (Array.isArray(typ)) return transformEnum(typ, val);
156156 if (typeof typ === "object") {
157157 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
158- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
158+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
159159 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
160160 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
161161 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-flowdefault / TopLevel.js+1 −1
@@ -156,7 +156,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
156156 if (Array.isArray(typ)) return transformEnum(typ, val);
157157 if (typeof typ === "object") {
158158 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
159- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
159+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
160160 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
161161 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
162162 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -155,7 +155,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
155155 if (Array.isArray(typ)) return transformEnum(typ, val);
156156 if (typeof typ === "object") {
157157 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
158- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
158+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
159159 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
160160 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
161161 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/comment-injection-nested-comment.schema

4 generated files · +4 −4
Mcomment-injection-typescriptdefault / TopLevel.ts+1 −1
@@ -147,7 +147,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
147147 if (Array.isArray(typ)) return transformEnum(typ, val);
148148 if (typeof typ === "object") {
149149 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
150- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
150+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151151 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
153153 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-flowdefault / TopLevel.js+1 −1
@@ -147,7 +147,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
147147 if (Array.isArray(typ)) return transformEnum(typ, val);
148148 if (typeof typ === "object") {
149149 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
150- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
150+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151151 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
153153 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -147,7 +147,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
147147 if (Array.isArray(typ)) return transformEnum(typ, val);
148148 if (typeof typ === "object") {
149149 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
150- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
150+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151151 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
153153 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/comment-injection.schema

4 generated files · +4 −4
Mcomment-injection-typescriptdefault / TopLevel.ts+1 −1
@@ -175,7 +175,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
175175 if (Array.isArray(typ)) return transformEnum(typ, val);
176176 if (typeof typ === "object") {
177177 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
178- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
178+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
179179 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
180180 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
181181 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-flowdefault / TopLevel.js+1 −1
@@ -175,7 +175,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
175175 if (Array.isArray(typ)) return transformEnum(typ, val);
176176 if (typeof typ === "object") {
177177 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
178- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
178+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
179179 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
180180 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
181181 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -175,7 +175,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
175175 if (Array.isArray(typ)) return transformEnum(typ, val);
176176 if (typeof typ === "object") {
177177 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
178- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
178+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
179179 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
180180 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
181181 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/const-non-string.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -143,7 +143,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
143143 if (Array.isArray(typ)) return transformEnum(typ, val);
144144 if (typeof typ === "object") {
145145 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
146- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
149149 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/constructor.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (Array.isArray(typ)) return transformEnum(typ, val);
142142 if (typeof typ === "object") {
143143 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/cut-enum.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/date-time-or-string.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (Array.isArray(typ)) return transformEnum(typ, val);
142142 if (typeof typ === "object") {
143143 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/date-time.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -143,7 +143,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
143143 if (Array.isArray(typ)) return transformEnum(typ, val);
144144 if (typeof typ === "object") {
145145 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
146- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
149149 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/default-value.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/description-with-double-quotes.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/description.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -174,7 +174,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
174174 if (Array.isArray(typ)) return transformEnum(typ, val);
175175 if (typeof typ === "object") {
176176 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
177- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
177+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
178178 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
179179 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
180180 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -172,7 +172,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
172172 if (Array.isArray(typ)) return transformEnum(typ, val);
173173 if (typeof typ === "object") {
174174 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
175- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
175+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
176176 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
177177 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
178178 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/direct-union.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/empty-object.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -133,7 +133,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
133133 if (Array.isArray(typ)) return transformEnum(typ, val);
134134 if (typeof typ === "object") {
135135 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
136- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
136+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
137137 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
138138 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
139139 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -133,7 +133,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
133133 if (Array.isArray(typ)) return transformEnum(typ, val);
134134 if (typeof typ === "object") {
135135 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
136- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
136+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
137137 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
138138 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
139139 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/enum-large.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -164,7 +164,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
164164 if (Array.isArray(typ)) return transformEnum(typ, val);
165165 if (typeof typ === "object") {
166166 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
167- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
167+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
168168 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
169169 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
170170 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (Array.isArray(typ)) return transformEnum(typ, val);
142142 if (typeof typ === "object") {
143143 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/enum-with-null.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/enum-with-values.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/enum.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -157,7 +157,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
157157 if (Array.isArray(typ)) return transformEnum(typ, val);
158158 if (typeof typ === "object") {
159159 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
160- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
160+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
161161 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
162162 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
163163 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -148,7 +148,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
148148 if (Array.isArray(typ)) return transformEnum(typ, val);
149149 if (typeof typ === "object") {
150150 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
151- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
154154 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/go-schema-pattern-properties.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/haskell-enum-forbidden.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/id-no-address.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/id-root.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/ie-suffix-singularization.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/implicit-all-of.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/implicit-class-array-union.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -143,7 +143,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
143143 if (Array.isArray(typ)) return transformEnum(typ, val);
144144 if (typeof typ === "object") {
145145 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
146- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
149149 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -143,7 +143,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
143143 if (Array.isArray(typ)) return transformEnum(typ, val);
144144 if (typeof typ === "object") {
145145 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
146- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
149149 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/implicit-one-of.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/integer-before-number.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/integer-float-union.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/integer-string.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -144,7 +144,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
144144 if (Array.isArray(typ)) return transformEnum(typ, val);
145145 if (typeof typ === "object") {
146146 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
147- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
150150 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -144,7 +144,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
144144 if (Array.isArray(typ)) return transformEnum(typ, val);
145145 if (typeof typ === "object") {
146146 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
147- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
150150 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/integer-type.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -144,7 +144,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
144144 if (Array.isArray(typ)) return transformEnum(typ, val);
145145 if (typeof typ === "object") {
146146 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
147- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
150150 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -144,7 +144,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
144144 if (Array.isArray(typ)) return transformEnum(typ, val);
145145 if (typeof typ === "object") {
146146 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
147- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
150150 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/intersection-nested.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -135,7 +135,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
135135 if (Array.isArray(typ)) return transformEnum(typ, val);
136136 if (typeof typ === "object") {
137137 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
138- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
138+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139139 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
141141 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -135,7 +135,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
135135 if (Array.isArray(typ)) return transformEnum(typ, val);
136136 if (typeof typ === "object") {
137137 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
138- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
138+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139139 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
141141 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/intersection.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (Array.isArray(typ)) return transformEnum(typ, val);
142142 if (typeof typ === "object") {
143143 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (Array.isArray(typ)) return transformEnum(typ, val);
142142 if (typeof typ === "object") {
143143 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/issue2680-top-level-array.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -133,7 +133,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
133133 if (Array.isArray(typ)) return transformEnum(typ, val);
134134 if (typeof typ === "object") {
135135 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
136- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
136+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
137137 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
138138 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
139139 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -133,7 +133,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
133133 if (Array.isArray(typ)) return transformEnum(typ, val);
134134 if (typeof typ === "object") {
135135 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
136- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
136+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
137137 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
138138 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
139139 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/keyword-enum.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -415,7 +415,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
415415 if (Array.isArray(typ)) return transformEnum(typ, val);
416416 if (typeof typ === "object") {
417417 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
418- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
418+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
419419 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
420420 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
421421 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/keyword-unions.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -1792,7 +1792,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
17921792 if (Array.isArray(typ)) return transformEnum(typ, val);
17931793 if (typeof typ === "object") {
17941794 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
1795- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
1795+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
17961796 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
17971797 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
17981798 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -964,7 +964,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
964964 if (Array.isArray(typ)) return transformEnum(typ, val);
965965 if (typeof typ === "object") {
966966 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
967- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
967+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
968968 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
969969 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
970970 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/light.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (Array.isArray(typ)) return transformEnum(typ, val);
142142 if (typeof typ === "object") {
143143 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (Array.isArray(typ)) return transformEnum(typ, val);
142142 if (typeof typ === "object") {
143143 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/list.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/min-max-items.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -142,7 +142,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
142142 if (Array.isArray(typ)) return transformEnum(typ, val);
143143 if (typeof typ === "object") {
144144 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
145- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
148148 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/minmax-integer.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -143,7 +143,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
143143 if (Array.isArray(typ)) return transformEnum(typ, val);
144144 if (typeof typ === "object") {
145145 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
146- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
149149 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -143,7 +143,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
143143 if (Array.isArray(typ)) return transformEnum(typ, val);
144144 if (typeof typ === "object") {
145145 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
146- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
149149 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/minmax.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -143,7 +143,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
143143 if (Array.isArray(typ)) return transformEnum(typ, val);
144144 if (typeof typ === "object") {
145145 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
146- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
149149 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -143,7 +143,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
143143 if (Array.isArray(typ)) return transformEnum(typ, val);
144144 if (typeof typ === "object") {
145145 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
146- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
149149 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/minmaxlength.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/multi-type-enum.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -143,7 +143,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
143143 if (Array.isArray(typ)) return transformEnum(typ, val);
144144 if (typeof typ === "object") {
145145 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
146- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
149149 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/mutually-recursive.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -143,7 +143,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
143143 if (Array.isArray(typ)) return transformEnum(typ, val);
144144 if (typeof typ === "object") {
145145 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
146- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
149149 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -143,7 +143,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
143143 if (Array.isArray(typ)) return transformEnum(typ, val);
144144 if (typeof typ === "object") {
145145 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
146- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
149149 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/nested-intersection-union.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -143,7 +143,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
143143 if (Array.isArray(typ)) return transformEnum(typ, val);
144144 if (typeof typ === "object") {
145145 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
146- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
149149 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -143,7 +143,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
143143 if (Array.isArray(typ)) return transformEnum(typ, val);
144144 if (typeof typ === "object") {
145145 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
146- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
146+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
147147 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
149149 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/non-standard-ref.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/nullable-optional-one-of.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (Array.isArray(typ)) return transformEnum(typ, val);
142142 if (typeof typ === "object") {
143143 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/object-type-required.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/optional-any.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/optional-const-ref.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -146,7 +146,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
146146 if (Array.isArray(typ)) return transformEnum(typ, val);
147147 if (typeof typ === "object") {
148148 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
149- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
151151 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
152152 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -146,7 +146,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
146146 if (Array.isArray(typ)) return transformEnum(typ, val);
147147 if (typeof typ === "object") {
148148 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
149- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
151151 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
152152 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/optional-constraints.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/optional-date-time.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/optional-enum.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/pattern.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/postman-collection.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -146,7 +146,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
146146 if (Array.isArray(typ)) return transformEnum(typ, val);
147147 if (typeof typ === "object") {
148148 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
149- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
151151 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
152152 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -146,7 +146,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
146146 if (Array.isArray(typ)) return transformEnum(typ, val);
147147 if (typeof typ === "object") {
148148 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
149- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
151151 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
152152 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/prefix-items.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/recursive-union-flattening.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -149,7 +149,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
149149 if (Array.isArray(typ)) return transformEnum(typ, val);
150150 if (typeof typ === "object") {
151151 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
152- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
154154 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
155155 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -149,7 +149,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
149149 if (Array.isArray(typ)) return transformEnum(typ, val);
150150 if (typeof typ === "object") {
151151 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
152- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
152+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
153153 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
154154 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
155155 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/ref-id-files.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/ref-remote.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/renaming-bug.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -238,7 +238,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
238238 if (Array.isArray(typ)) return transformEnum(typ, val);
239239 if (typeof typ === "object") {
240240 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
241- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
241+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
242242 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
243243 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
244244 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -223,7 +223,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
223223 if (Array.isArray(typ)) return transformEnum(typ, val);
224224 if (typeof typ === "object") {
225225 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
226- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
226+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
227227 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
228228 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
229229 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/required-draft3.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/required-non-properties.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/required.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/rust-cycle-breaker-union.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -145,7 +145,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
145145 if (Array.isArray(typ)) return transformEnum(typ, val);
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
148- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
148+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
151151 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/schema-constraints.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -137,7 +137,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
137137 if (Array.isArray(typ)) return transformEnum(typ, val);
138138 if (typeof typ === "object") {
139139 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
140- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
143143 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/simple-ref.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/strict-optional.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/top-level-array.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -139,7 +139,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
139139 if (Array.isArray(typ)) return transformEnum(typ, val);
140140 if (typeof typ === "object") {
141141 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
142- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
145145 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/top-level-enum.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -133,7 +133,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
133133 if (Array.isArray(typ)) return transformEnum(typ, val);
134134 if (typeof typ === "object") {
135135 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
136- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
136+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
137137 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
138138 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
139139 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/top-level-primitive-array.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -133,7 +133,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
133133 if (Array.isArray(typ)) return transformEnum(typ, val);
134134 if (typeof typ === "object") {
135135 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
136- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
136+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
137137 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
138138 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
139139 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -133,7 +133,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
133133 if (Array.isArray(typ)) return transformEnum(typ, val);
134134 if (typeof typ === "object") {
135135 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
136- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
136+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
137137 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
138138 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
139139 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/top-level-primitive.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -136,7 +136,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
136136 if (Array.isArray(typ)) return transformEnum(typ, val);
137137 if (typeof typ === "object") {
138138 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
139- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
139+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
140140 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
141141 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
142142 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/tuple.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/unevaluated-properties.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -154,7 +154,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
154154 if (Array.isArray(typ)) return transformEnum(typ, val);
155155 if (typeof typ === "object") {
156156 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
157- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
157+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
158158 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
159159 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
160160 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -151,7 +151,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
151151 if (Array.isArray(typ)) return transformEnum(typ, val);
152152 if (typeof typ === "object") {
153153 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
154- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
154+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
155155 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
156156 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
157157 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/union-int-double.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -138,7 +138,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
138138 if (Array.isArray(typ)) return transformEnum(typ, val);
139139 if (typeof typ === "object") {
140140 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
141- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
141+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
142142 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
143143 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
144144 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/union-list.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (Array.isArray(typ)) return transformEnum(typ, val);
142142 if (typeof typ === "object") {
143143 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -141,7 +141,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
141141 if (Array.isArray(typ)) return transformEnum(typ, val);
142142 if (typeof typ === "object") {
143143 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
144- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
146146 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
147147 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/union.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -140,7 +140,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
140140 if (Array.isArray(typ)) return transformEnum(typ, val);
141141 if (typeof typ === "object") {
142142 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
143- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
143+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
144144 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
145145 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
146146 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/uuid.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -147,7 +147,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
147147 if (typeof typ === "object") {
148148 return typ.hasOwnProperty("uuid") ? typeof val === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(val) ? val : invalidValue(typ, val, key, parent)
149149 : typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
150- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
150+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
151151 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
152152 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
153153 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -130,7 +130,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("uuid") ? typeof val === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(val) ? val : invalidValue(typ, val, key, parent)
132132 : typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
133- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
135135 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
136136 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -146,7 +146,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
146146 if (typeof typ === "object") {
147147 return typ.hasOwnProperty("uuid") ? typeof val === "string" && /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(val) ? val : invalidValue(typ, val, key, parent)
148148 : typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
149- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
149+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
150150 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
151151 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
152152 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Test case

test/inputs/schema/vega-lite.schema

3 generated files · +3 −3
Mschema-flowdefault / TopLevel.js+1 −1
@@ -6227,7 +6227,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
62276227 if (Array.isArray(typ)) return transformEnum(typ, val);
62286228 if (typeof typ === "object") {
62296229 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
6230- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
6230+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
62316231 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
62326232 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
62336233 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-javascriptdefault / TopLevel.js+1 −1
@@ -129,7 +129,7 @@ function transform(val, typ, getProps, key = '', parent = '') {
129129 if (Array.isArray(typ)) return transformEnum(typ, val);
130130 if (typeof typ === "object") {
131131 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
132- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
132+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
133133 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
134134 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
135135 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
Mschema-typescriptdefault / TopLevel.ts+1 −1
@@ -5984,7 +5984,7 @@ function transform(val: any, typ: any, getProps: any, key: any = '', parent: any
59845984 if (Array.isArray(typ)) return transformEnum(typ, val);
59855985 if (typeof typ === "object") {
59865986 return typ.hasOwnProperty("pattern") ? typeof val === "string" && new RegExp(typ.pattern).test(val) ? val : invalidValue(typ, val, key, parent)
5987- : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || val.length >= typ.min) && (typ.max === undefined || val.length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
5987+ : typ.hasOwnProperty("string") ? typeof val === "string" && (typ.min === undefined || Array.from(val).length >= typ.min) && (typ.max === undefined || Array.from(val).length <= typ.max) ? transform(val, typ.string, getProps, key, parent) : invalidValue(typ, val, key, parent)
59885988 : typ.hasOwnProperty("number") ? typeof val === "number" && (typ.min === undefined || val >= typ.min) && (typ.max === undefined || val <= typ.max) ? transform(val, typ.number, getProps, key, parent) : invalidValue(typ, val, key, parent)
59895989 : typ.hasOwnProperty("integer") ? typeof val === "number" && val % 1 === 0 ? val : invalidValue(l("integer"), val, key, parent)
59905990 : typ.hasOwnProperty("unionMembers") ? transformUnion(typ.unionMembers, val)
No generated files match these filters.