title: Equivalent of array_unique and preg_split PREG_SPLIT_NO_EMPTY
body: <p>I'm looking for the exact Javascript equivalent of php:</p>
  
  <pre><code>$tags = preg_split('/+/', $_GET['q'], NULL, PREG_SPLIT_NO_EMPTY);
  $p = array_unique(array_map('strtolower', $tags));
  sort($p);
  </code></pre>
  
  <p>It's almost done</p>
  
  <pre><code>var queryString = decodeURIComponent(location.search.substring(1)).toLowerCase(); 
  var key = queryString.split('&amp;')[0].split('=');
  if (key.length &gt; 1){ //q should be the only query key
      var tags = key[1].split(/\+/g);
      // make tags values unique, non-empty and ordered alphabetically
  }
  </code></pre>
  
  <p>but I'm looking for 3 things that are make tags values unique, non-empty and ordered alphabetically, it's done easily in php, I hope there are such solutions in JavaScript.</p>