Is there a constant available in Node.JS for a newline character that is specific to the platform the application is running on?
For example:
- Windows:
\r\n
- *nix:
\n
Not sure if this is new in the 0.8.x but there is now a constant http://nodejs.org/api/os.html#os_os_eol
const {EOL} = require('os');
import { EOL } from 'os'
, but I also recognize the answer was written in 2012 with comments/edits going to 2019
\n
all the time?