Skip to content

Commit

Permalink
fix: Allow using this module on Node.js < 7
Browse files Browse the repository at this point in the history
  • Loading branch information
prantlf committed Nov 25, 2017
1 parent 655110f commit 8c569d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ const path = require('path')
const template = handlebars.compile(fs.readFileSync(
path.join(__dirname, 'template.hbs'), 'utf-8'))

const objectValues = require('object.values')
if (!Object.values) {
objectValues.shim()
}

module.exports = function (results) {
var files = {}
var errorCount = 0
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
},
"dependencies": {
"handlebars": "^4.0.11"
"handlebars": "^4.0.11",
"object.values": "^1.0.4"
},
"devDependencies": {
"semantic-release": "^8.2.0",
Expand Down

0 comments on commit 8c569d5

Please sign in to comment.