expected-node-version
v1.0.2
Published
Retrieves the node version from the package.json or .nvmrc file
Downloads
265,517
Readme
expected-node-version
API
var version = require('expected-node-version')([directory])
Load order
The module tries to load the version using the fastest mechanisms.
It falls pack to loading the package.json content using require
. So that content should will be cached.
- fetch version from package.json environment variable, which gets set by
npm start
- fetch version from .nvmrc file
- fetch version from package.json value
engines.node