Figures out the lowest version of Node.js that satisfies engines.node in package.json.
Can be quite useful for which node version to configure babel-preset-env for.
Node.js, at least v8.0.0, but not v9.
Recommended to install latest via nvm:
nvm install stablenpm install -g minimum-node-versionminimum-node-versionWill print the Node.js version.
You can also import or require the module, and use it programmatically.
import minimumNodeVersion from 'minimum-node-version'
minimumNodeVersion().then(
version => console.log(version)
)Figures out the minimum Node.js version that satisfies the project's configuration.
Returns Promise<String> A Promise of the lowest compatible Node.js version.