node-version-matches

3.0.0 • Public • Published

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>.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.0
    8
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 3.0.0
    8
  • 2.0.1
    18,528
  • 1.0.1
    5,317
  • 1.0.0
    19

Package Sidebar

Install

npm i node-version-matches

Weekly Downloads

23,872

Version

3.0.0

License

MIT

Unpacked Size

3.3 kB

Total Files

4

Last publish

Collaborators

  • 75lb