yaorg/node-measured

Object.values is not a function on Nodejs 6.9.0

muxator opened this issue · 1 comments

According to its package.json, measured-core 1.11.2 should support Node >= 5.12.

When testing Etherpad 1.7 against Node 6.9.0 (ether/etherpad-lite#3459), I found that measured-core uses Object.values(), a feature that was introduced in Node 7.x.

const metricTypeValues = Object.values(MetricTypes);

For Etherpad we resolved using a polyfill (ether/etherpad-lite@fc14f60).

For next node-measured version, you may want to update package.json (requiring node >= 7.x). Or - if you want to continue supporting Node 5 - either use a polyfill or change the code to not use Object.values().

Thank you for your library!

I would like this project compatible with all currently supported Node LTS releases. The oldest LTS release is 6.x and will be supported until April 2019.

So I think refactoring or poly-filling would be good.

Let me look into things, but the poly fills might be nice, since they can be dropped once 6.x becomes unsupported.