Socket
Book a DemoInstallSign in
Socket

at-least-node

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

at-least-node

Lightweight Node.js version sniffing/comparison

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
20M
-3.69%
Maintainers
1
Weekly downloads
 
Created
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

semver

FAQs

Package last updated on 01 Feb 2020

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