MCPcopy Create free account
hub / github.com/sshwsfc/xadmin / convert

Function convert

packages/xadmin-form/src/schema.js:42–53  ·  view source on GitHub ↗
(schema, options)

Source from the content-addressed store, hash-verified

40}
41
42const convert = (schema, options) => {
43 const opts = options || {}
44 if(opts.path === undefined) {
45 opts.path = []
46 }
47 if(opts.lookup === undefined) {
48 opts.lookup = {}
49 }
50 return app.get('schema_converter').reduce((prve, converter) => {
51 return converter(prve, schema, opts)
52 }, opts.global && opts.global.formDefaults ? _.cloneDeep(opts.global.formDefaults) : {})
53}
54
55const converters = [
56 // all form field

Callers 1

schema.jsFile · 0.70

Calls 2

reduceMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected