mollie / mollie-api-node

Official Mollie API client for Node
http://www.mollie.com
BSD 3-Clause "New" or "Revised" License
231 stars 63 forks source link

Fix bug on Node.js < 12 #287

Closed Pimm closed 1 year ago

Pimm commented 2 years ago

Inspecting objects (payments, customers, subscriptions, etc.) would throw an error on Node.js < 12, because the inspect.custom implementation relied on both Object.entries and Object.fromEntries.

edorivai commented 2 years ago

Approved the change, because the change itself looks good, but did you check for other occurrences of Object.* functions that are not supported by Node <12?

Pimm commented 2 years ago

I just checked. The only other functions we're using are Object.assign and Object.create, so we should we OK.

We do test on Node.js 6. It just turns out there is no .toString() in the test suite. Come to think of it, I might as well add that.