Skip to content

Commit a66dfa8

Browse files
author
Josh Quintana
committed
Fix 'bench' not working on windows
1 parent 01be2a8 commit a66dfa8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

benchmark/parse_map.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@
3030
*/
3131

3232
var fs = require('fs');
33-
var endOfLine = require('os').EOL;
3433

3534
function parse(filename) {
36-
var content = fs.readFileSync(filename).toString();
37-
var lines = content.split(endOfLine);
35+
var content = fs.readFileSync(filename, { encoding: 'utf8' });
36+
var lines = content.split(/\r?\n/);
3837
return {
3938
height : parseInt(lines[1].split(' ')[1]),
4039
width : parseInt(lines[2].split(' ')[1]),

0 commit comments

Comments
 (0)