Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

check-node-version

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check-node-version

Check installed versions of node and npm

  • 2.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
174K
increased by19.72%
Maintainers
1
Weekly downloads
 
Created

What is check-node-version?

The check-node-version npm package is a utility that allows you to check if the current Node.js and npm versions match the specified versions. It is useful for ensuring that your development environment meets the required versions for a project.

What are check-node-version's main functionalities?

Check Node.js version

This feature allows you to check if the current Node.js version meets the specified version requirement. In this example, it checks if the Node.js version is greater than or equal to 10.0.0.

const check = require('check-node-version');

check({ node: '>= 10.0.0' }, (error, result) => {
  if (error) {
    console.error(error);
    return;
  }

  console.log(result);
});

Check npm version

This feature allows you to check if the current npm version meets the specified version requirement. In this example, it checks if the npm version is greater than or equal to 6.0.0.

const check = require('check-node-version');

check({ npm: '>= 6.0.0' }, (error, result) => {
  if (error) {
    console.error(error);
    return;
  }

  console.log(result);
});

Check multiple versions

This feature allows you to check multiple version requirements at once. In this example, it checks if both the Node.js version is greater than or equal to 10.0.0 and the npm version is greater than or equal to 6.0.0.

const check = require('check-node-version');

check({ node: '>= 10.0.0', npm: '>= 6.0.0' }, (error, result) => {
  if (error) {
    console.error(error);
    return;
  }

  console.log(result);
});

Other packages similar to check-node-version

Keywords

FAQs

Package last updated on 01 May 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc