function createValueView(value) {
  if ($.isArray(value) && value.length >= 1) {
    // Generate <li>
    let items = $.map(value, (v) => $('<li>').text(v))
    // Append values as unordered list (ul) of list item (li)
    return $('<ul>').append(...items)
  } else if (value.match && value.match(/^https?:\/\/.+/)) {
    // Display links
    return $('<a target="_blank">').attr("href", value).text(value)
  }
  // Display text
  return $('<span>').text(value)
}
// Create html to display string, array of string, etc.
Create html to display string, array of string, etc.
Create html to display string array of string etc .
function createValueView(value) {
  if ($.isArray(value) && value.length >= 1) {
    let items = $.map(value, (v) => $('<li>').text(v))
    return $('<ul>').append(...items)
  } else if (value.match && value.match(/^https?:\/\/.+/)) {
    return $('<a target="_blank">').attr("href", value).text(value)
  }
  return $('<span>').text(value)
}
function createValueView ( value ) { if ( $ . isArray ( value ) && value . length >= 1 ) { let items = $ . map ( value , ( v ) => $ ( '<li>' ) . text ( v ) ) return $ ( '<ul>' ) . append ( ... items ) } else if ( value . match && value . match ( / ^https?:\/\/.+ / ) ) { return $ ( '<a target="_blank">' ) . attr ( "href" , value ) . text ( value ) } return $ ( '<span>' ) . text ( value ) }
Create html to display string, array of string, etc.
Create html to display string array of string etc .
// Generate <li> // Append values as unordered list (ul) of list item (li) // Display links // Display text