MCPcopy Create free account
hub / github.com/formschema/native / parseBoolean

Function parseBoolean

lib/parser.js:71–89  ·  view source on GitHub ↗
(vm, schema)

Source from the content-addressed store, hash-verified

69}
70
71export const parseBoolean = (vm, schema) => {
72 let field = schema.attrs || {}
73
74 setCommonFields(schema, field)
75
76 if (!field.type) {
77 field.type = 'checkbox'
78 }
79
80 field.checked = schema.checked || false
81
82 if (schema.name) {
83 field.name = schema.name
84
85 setFormValue(vm, field)
86 }
87
88 return field
89}
90
91export const parseString = (vm, schema) => {
92 let field = schema.attrs || {}

Callers 1

loadFieldsFunction · 0.85

Calls 2

setCommonFieldsFunction · 0.85
setFormValueFunction · 0.85

Tested by

no test coverage detected