Javascript Replace Newline With Comma