Skip to content

Commit

Permalink
[refactor minor] Use JSON.parse when getting version
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalecki committed Oct 13, 2011
1 parent cc76162 commit fde1216
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/vows.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,6 @@ vows.describe = function (subject) {
};


vows.version = require('fs').readFileSync(path.join(__dirname, '..', 'package.json'))
.toString().match(/"version"\s*:\s*"([\d.]+)"/)[1];
vows.version = JSON.parse(require('fs')
.readFileSync(path.join(__dirname, '..', 'package.json')))
.version

0 comments on commit fde1216

Please sign in to comment.