We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01be2a8 commit a66dfa8Copy full SHA for a66dfa8
benchmark/parse_map.js
@@ -30,11 +30,10 @@
30
*/
31
32
var fs = require('fs');
33
-var endOfLine = require('os').EOL;
34
35
function parse(filename) {
36
- var content = fs.readFileSync(filename).toString();
37
- var lines = content.split(endOfLine);
+ var content = fs.readFileSync(filename, { encoding: 'utf8' });
+ var lines = content.split(/\r?\n/);
38
return {
39
height : parseInt(lines[1].split(' ')[1]),
40
width : parseInt(lines[2].split(' ')[1]),
0 commit comments