parse-node-version
Turn node's process.version into something useful.
Last updated 3 years ago by phated .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install parse-node-version 
SYNC missed versions from official npm registry.

parse-node-version

NPM version Downloads Build Status Coveralls Status

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

Current Tags

  • 2.0.0                                ...           latest (3 years ago)

3 Versions

  • 2.0.0                                ...           3 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 0
Dependencies (0)
None
Dev Dependencies (6)
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |