title: How to check if all arguments equal the same thing and return a string
body: <p>I am wanting to join the arguments (all strings) that are passed in to my function together with a delimiter of ' | ', but if they are all empty strings, then to just pass an empty string.</p>
  
  <p>I have the following:</p>
  
  <pre><code>constructString(one: string, two: string, three: string) {
    if (one === '' &amp;&amp; two === '' &amp;&amp; three === '') {
      return '';
    }
    return [one, two, three].filter(Boolean).join('|')
  }
  </code></pre>
  
  <p>My question is...  Is there a simpler, more elegant way of performing this, or some useful function that JS has that I am missing in order to perform this task?</p>