Ubuntu Pastebin

Paste from frankban at Wed, 30 Sep 2015 14:13:29 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
var tags = result.tags;
      if (tags) {
        result.tags = tags.split(',').reduce(function(collected, value) {
          var tag = value.trim().split(/\s+/).join('-');
          if (tag) {
            collected.push(tag);
          }
          return collected;
        }, []);
      }
      return result;
Download as text