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

parse-node-version

NPM version Downloads Travis Build Status AppVeyor Build Status Coveralls Status Gitter chat

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

  • 1.0.1                                ...           latest (2 years ago)

2 Versions

  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Downloads
Today 2,102
This Week 15,468
This Month 121,829
Last Day 6,903
Last Week 35,382
Last Month 141,191
Dependencies (0)
None
Dev Dependencies (6)

Copyright 2014 - 2016 © taobao.org |