An alternative to core-js for nodeJS environments.
Loads all ECMAScript-262 (excluding annex-B) polyfills into nodeJS.
You should use this if you are wanting to use the latest stable features of JavaScript but the version of nodeJS you are using does not have those features.
$ npm install polyfill-library-node
require("polyfill-library-node");
// Now nodeJS has all stable JavaScript features such as Array.prototype.flatMap, Promise.allSettled etc
polyfill-library
follows the guidance from the W3C TAG on polyfilling and only implements polyfills features/proposals of ECMAScript that have reached stage 4 whereas core-js implements polyfills for proposals at all stages.
Those features are new pieces of syntax and not a standard built-in object, and JavaScript does not have a way to make the runtime (in this case nodeJS) understand new pieces of syntax. It is only possible to polyfill standard built-in objects. If you are wanting to use new syntax in a version of nodeJS which does not support it, you will need to use a compiler such as Babel and Babel's nodeJS CLI.