title: Can't figure out what this JS code means
body: <p>I've been romping through a piece of JS I came across online and can't figure out what this piece of code means. </p>
  
  <pre><code>global$string$newLines = function(a) {
      return a.replace(/(\r\n|\r|\n)/g, "\n");
  },
  </code></pre>
  
  <p>I'm specifically wondering about the piece <code>/(\r\n|\r|\n)/g</code></p>
  
  <p>Also - Is this machine generated code? Is that why the variable name is full of $s?</p>