title: CR, LF and CRLF characters in a String
body: <p>Is it safe to assume that a string will at any time only have either CR, LF or CRLF for a line break?</p>
  
  <p>I want to write a logic to replace all the LF characters with CRLF characters in JavaScript but I have to this doubt.</p>
  
  <p>I was thinking I can find all the LF (\n), check if it doesn't have CR(\r) before it and then replace the \n with \r\n.</p>
  
  <p>If anyone has done this, please suggest what is the best way to do it?</p>