When it comes to windows style line breaks you will want to start off with a carriage return follow by a new line. For posix style js line breaks forget the carriage return ans just inject a new line.
So the carriage return and new line escape notation can be used
Or the utf-16 code unit escape notation will work also.
in node there is the End Of Line property of the os module. This property will hold a carriage return plus new line value for windows systems, and just a new line value for posix. In other words the value of the End Of line property will change depending on the underlaying operating system used.
If you want consistent values regardless of the operating system you might want to stick to escape notation.
Another options that comes to mind is the decode url component method.