From 8c569d59279743b791ed2e356368be6ca51ede1c Mon Sep 17 00:00:00 2001 From: Ferdinand Prantl Date: Sat, 25 Nov 2017 21:13:23 +0100 Subject: [PATCH] fix: Allow using this module on Node.js < 7 --- index.js | 5 +++++ package.json | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e5faaba..54886fe 100644 --- a/index.js +++ b/index.js @@ -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 diff --git a/package.json b/package.json index 068fd07..ab3c471 100644 --- a/package.json +++ b/package.json @@ -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",