validate-node-version
A module that checks your current node version against a projects package.json
Installation:
npm install --save validate-node-version
Usage:
var validatenv = ; if !validatenvsatisfies // handle bad node version else // handle good node version
You can pass a version to the module that overrides the version in the projects package.json
:
'4.0.x';
This module returns a an object with the structure below:
message: String // a message about whether this failed or passed and why actual: String // the current version of node being used expected: String // the expected range for node version satisfies: Boolean // does the actual version satisfy the expected version
Example Gulp integration
var gulp = validatenv = ; gulp;