code: function getHighlightedString(arr, className) {
    if (arr && arr.length > 0) {
      return arr.map(function(v, i) {
        if (i % 2 !== 0 && i !== arr.length - 1 && v !== '') return '<span class="' + className + '">' + v + '</span>';
        else return v;
      }).join('');
    }
  }
docs: /*
  type Classname = String
  getHighlightedString :: Array -> Classname -> String
   
  Adds a span with provided class around matched characters
  @param  {Array}  arr       A matched array
  @param  {String} className A css class name
  @return {String}           A string with matched character surrounded by span with given css class name