Huge news!Announcing our $20M Series A led by Andreessen Horowitz.Learn more
Socket
Socket
Log inDemoInstall

at-least-node

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Issues
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

at-least-node

Lightweight Node.js version sniffing/comparison

    1.0.0latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
16,263,487
decreased by-8.95%

Weekly downloads

Readme

Source

at-least-node

npm node NPM

Sometimes you need to check if you're on at least a given Node.js version, but you don't want to pull in the whole semver kitchen sink. That's what at-least-node is for.

PackageSize
at-least-node2.6 kB
semver75.5 kB
const atLeastNode = require('at-least-node')
atLeastNode('10.12.0')
// -> true on Node 10.12.0+, false on anything below that

When passing in a version string:

  • You cannot include a leading v (i.e. v10.12.0)
  • You cannot omit sections (i.e. 10.12)
  • You cannot use pre-releases (i.e. 1.0.0-beta)
  • There is no input validation, if you make a mistake, the resulting behavior is undefined

Keywords

FAQs

Last updated on 01 Feb 2020

Did you know?

Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install
SocketSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc