parse-node-version

2.0.0last stable release 3 years ago
Complexity Score
Low
Open Issues
0
Dependent Projects
123
Weekly Downloadsglobal
6,309,306

License

  • MIT
    • Yesattribution
    • Permissivelinking
    • Permissivedistribution
    • Permissivemodification
    • Nopatent grant
    • Yesprivate use
    • Permissivesublicensing
    • Notrademark grant

Downloads

Readme

parse-node-version

Turn node’s process.version into something useful.

Usage

var nodeVersion = require('parse-node-version')(process.version);

console.log(
  nodeVersion.major,
  nodeVersion.minor,
  nodeVersion.patch,
  nodeVersion.pre,
  nodeVersion.build
);

API

parseVersion(nodeVersionString)

Takes a node version string (usually process.version) and returns an object with the major/minor/patch (which will all be numbers) and pre/build keys (which will always be a string). If the version doesn’t contain any pre-release or build information, the properties will be returned as empty string.

License

MIT

Dependencies

Loading dependencies...

CVE IssuesActive
0
Scorecards Score
4.20
Test Coverage
100.00%
Follows Semver
Yes
Github Stars
2
Dependenciestotal
6
DependenciesOutdated
4
DependenciesDeprecated
0
Threat Modelling
No
Repo Audits
No

Learn how to distribute parse-node-version in your own private NPM registry

npm config set registry  https://npm.cloudsmith.com/owner/repo
Processing...
Done
npm install parse-node-version
Processing...
Done

Releases

Loading Version Data
NPM on Cloudsmith

Getting started with NPM on Cloudsmith is fast and easy.