Skip to content

Commit fde1216

Browse files
committed
[refactor minor] Use JSON.parse when getting version
1 parent cc76162 commit fde1216

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/vows.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -187,5 +187,6 @@ vows.describe = function (subject) {
187187
};
188188

189189

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

0 commit comments

Comments
 (0)