diff --git a/lib/cache.js b/lib/cache.js index 7c18d033..d0c26c8b 100644 --- a/lib/cache.js +++ b/lib/cache.js @@ -39,19 +39,6 @@ module.exports = class Cache { } dump() { - // Object#fromEntries supported since Node.js 12 - - // eslint-disable-next-line node/no-unsupported-features/es-builtins - if (typeof Object.fromEntries === 'function') { - // eslint-disable-next-line node/no-unsupported-features/es-builtins - return Object.fromEntries(this.cache); - } - - // FIXME: A polyfill for Node.js 10 & 11 - const obj = {}; - this.cache.forEach((v, k) => { - obj[k] = v; - }); - return obj; + return Object.fromEntries(this.cache); } };