twreporter-react
Version:
React-Redux site for The Reporter Foundation in Taiwan
20 lines (13 loc) • 369 B
Markdown
Simple module that returns end of line base on the os.platform() in node.
When platform is windows it will return '\r\n' and in other case it will return '\n'
```
npm install endofline
```
```javascript
var eol = require('endofline');
var fs = requrie('fs');
var hosts = fs.readFileSync('/etc/hosts', 'utf-8').split(eol);
```