
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
node-version-check
Advanced tools
Check if the version of Node is greater than or equal to some version
Check if the runtime Node version satisfies some version
This module is meant to help out with running things only if the runtime version of node is greater than or equal a given version, such as 4.
The module exposes a binary called node-version-check
, which takes a string to check against as an argument.
Example usage is for example to not run eslint>=3
on version of node less than 4.
"scripts": {
"lint": "node-version-check \">=4\" && eslint . || node-version-check \"<4\""
}
It uses node-semver
's satisfies
under the hood, this allows you to check
against any arbitrary version, such as exact (node-version-check '4.0.0'
) or minor (node-version-check '^4.0.0'
)
etc..
For convenience, a binary to check whether the node version is >=4 and <4 is also included.
"scripts": {
"lint": "node-version-gte-4 && eslint . || echo Node version too old to run linting"
}
A bin with lt
is also included to avoid having to handle the OR case.
"scripts": {
"lint": "node-version-gte-4 && eslint . || node-version-lt-4"
}
There are also binaries for node@>=6
and node@<6
included.
[2.2.0] - 2017-07-09
node-version-gte-8
& node-version-lt-8
binariesFAQs
Check if the version of Node is greater than or equal to some version
The npm package node-version-check receives a total of 226 weekly downloads. As such, node-version-check popularity was classified as not popular.
We found that node-version-check demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.