Simple Javascript code for removing three types line break. here is simple code

//We define the text variable.
Var someText = "Here's is simple some text.\n It has some line breaks that will be removed from string \r using Javascript.\r\n";
<span class="cmt">//This javascript code removes all 3 types of line breaks</span>
someText = someText.replace(/(\r\n|\n|\r)/gm,"");