We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1d5872 commit e3f7a4bCopy full SHA for e3f7a4b
src/data/Model.mjs
@@ -86,6 +86,15 @@ class Model extends Base {
86
return this.fieldsMap.get(name) || null
87
}
88
89
+ /**
90
+ * Finds a field type by a given field name
91
+ * @param {String} name
92
+ * @returns {String|null} The lowercase field type or null if no match was found
93
+ */
94
+ getFieldType(name) {
95
+ return this.getField(name)?.type?.toLowerCase() || null
96
+ }
97
+
98
/**
99
* @param {Object[]} fields
100
* @param {Boolean} isRoot=true
0 commit comments