Skip to content

75lb/node-version-matches

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

view on npm npm module downloads Build Status Coverage Status js-standard-style

node-version-matches

Returns true if the current node version matches the given semver expression.

import nodeVersionMatches from 'node-version-matches'

// assuming we're using node version 10
console.log(nodeVersionMatches('>=7.6.0'))
// true

console.log(nodeVersionMatches('<7.6.0'))
// false

// optional: pass in a specific node version as the second arg.
console.log(nodeVersionMatches('<7.6.0', 'v4.0.0'))
// true
$ npm install node-version-matches

© 2018-21 Lloyd Brookes <75pound@gmail.com>.

About

Returns true if the current node version matches the given semver expression.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published