src/js/form-builder.js
function userAttrType(attr, attrData) {
    return (
      [
        ['array', ({ options }) => !!options],
        [typeof attrData.value, () => true], // string, number,
      ].find(typeCondition => typeCondition[1](attrData))[0] || 'string'
    )
  }
function userAttrType(attr, attrData) {
    return (
      [
        ['array', ({ options }) => !!options],
        [typeof attrData.value, () => true], // string, number,
      ].find(typeCondition => typeCondition[1](attrData))[0] || 'string'
    )
  }
function userAttrType ( attr , attrData ) { return ( [ [ 'array' , ( { options } ) => ! ! options ] , [ typeof attrData . value , ( ) => true ] , // string, number, ] . find ( typeCondition => typeCondition [ 1 ] ( attrData ) ) [ 0 ] || 'string' ) }
Detects the type of user defined attribute
@param {String} attr attribute name
@param {Object} attrData attribute config
@return {String} type of user attr
Detects the type of user defined attribute