Node.JS constant for platform-specific new line?

Solution 1:

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');