title: How to convert a function into a Pipe Function
body: <p>I have a function that I am trying to convert into a pipe function but I am still unsure after reading the documentation on angular's website. </p>
  
  <p>After following the documentation on their website it has left me still kind of confused.</p>
  
  <pre><code>checkBoolean() {
      if (boolean) {
        return 'true';
      } else if (!boolean) {
        return 'false';
      } else {
        return 'true';
      }
    }
  </code></pre>
  
  <p>The code works fine in this method but I am wanting to switch it to a pipe function.</p>