Fix node6 support for Object.entries and URL object (#548)

This patch introduces a polyfill for Object.entries which is missing in Node 6
This commit is contained in:
JoelEinbinder
2017-08-25 15:13:59 -07:00
committed by Andrey Lushnikov
parent 4e3b6a1f57
commit 2c4dfbfd88
5 changed files with 18 additions and 7 deletions

View File

@@ -218,4 +218,9 @@ class Helper {
}
}
// Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries
if (!Object.entries)
Object.entries = obj => Object.keys(obj).map(key => [key, obj[key]]);
module.exports = Helper;