fix: delete broken objectFromEntries
MODIFY
packages/ses/src/commons.js
packages/ses/src/commons.js
@@ -66,6 +66,7 @@ export const {
preventExtensions,
setPrototypeOf,
values,
+ fromEntries,
} = Object;
export const {
@@ -81,22 +82,6 @@ export const { isInteger } = Number;
export const { stringify: stringifyJson } = JSON;
-// At time of this writing, we still support Node 10 which doesn't have
-// `Object.fromEntries`. If it is absent, this should be an adequate
-// replacement.
-// By the terminology of https://ponyfoo.com/articles/polyfills-or-ponyfills
-// it is a ponyfill rather than a polyfill or shim because we do not
-// install it on `Object`.
-const objectFromEntries = entryPairs => {
- const result = {};
- for (const [prop, val] of entryPairs) {
- result[prop] = val;
- }
- return result;
-};
-
-export const fromEntries = Object.fromEntries || objectFromEntries;
-
// Needed only for the Safari bug workaround below
const { defineProperty: originalDefineProperty } = Object;

fix: delete broken objectFromEntries (#1306)