node-version-matches

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

MIT 4 个版本
安装
npm install node-version-matches
yarn add node-version-matches
pnpm add node-version-matches
bun add node-version-matches
README

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

版本列表
3.0.0 2021-05-19
2.0.1 2019-11-06
1.0.1 2018-11-21
1.0.0 2018-06-28