Is there a mapping somewhere from Node.js version, e.g. 0.10, or 14, to the corresponding ECMAScript version, e.g. ES5, ES2020?
As this question is closed, I can't post the solution I came up with as an answer, so it is here instead.
@bevry/node-versions includes
fetchESVersionForNodeVersion(nodeVersion: string): Promise<string>
which will fetch the ECMAScript version that was ratified by the time that the Node.js version was released.
Which features ship with which Node.js version by default?
The website node.green provides an excellent overview over supported ECMAScript features in various versions of Node.js, based on kangax's compat-table.
Source: https://nodejs.org/en/docs/es6/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With