import map from 'array-map'
import find from 'array-find'

export default function (value, list) {
  let rs = map(value, (one, index) => {
    return find(list, item => {
      return item.value === one
    })
  })
  return map(rs, one => {
    return one.name
  }).join(' ').replace('--', '')
}

@@ -92,52 +92,196 @@
 list
-) %7B%0A  let rs = map(value, (one, index) =%3E %7B%0A
+, delimiter) %7B%0A  if (!delimiter) %7B%0A    delimiter = ' '%0A  %7D%0A  let rs = map(value, (one, index) =%3E %7B%0A    if (list.length && Object.prototype.toString.call(list%5B0%5D) === '%5Bobject Array%5D') %7B%0A  
     
@@ -296,16 +296,23 @@
 ind(list
+%5Bindex%5D
 , item =
@@ -311,24 +311,26 @@
 , item =%3E %7B%0A
+  
       return
@@ -353,18 +353,116 @@
 one%0A    
+  %7D)%0A    %7D else %7B%0A      return find(list, item =%3E %7B%0A        return item.value === one%0A      %7D)%0A    
 %7D
-)
 %0A  %7D)%0A  
@@ -515,19 +515,25 @@
 %7D).join(
-' '
+delimiter
 ).replac

update valu2name