Skip to content

Commit

Permalink
Fix 'bench' not working on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh Quintana committed Jan 24, 2015
1 parent 01be2a8 commit a66dfa8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions benchmark/parse_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@
*/

var fs = require('fs');
var endOfLine = require('os').EOL;

function parse(filename) {
var content = fs.readFileSync(filename).toString();
var lines = content.split(endOfLine);
var content = fs.readFileSync(filename, { encoding: 'utf8' });
var lines = content.split(/\r?\n/);
return {
height : parseInt(lines[1].split(' ')[1]),
width : parseInt(lines[2].split(' ')[1]),
Expand Down

0 comments on commit a66dfa8

Please sign in to comment.