version

0.1.2 • Public • Published

version

Node.js package.json version number fetcher

Build Status

Installation

$ npm install version

Example (basic)

var version = require('version');
 
version.fetch('express', function(error, version) {
  if (error) {
    console.error(error);
  } else {
    console.log('express current version: ', version);
  };
});

Example (RegExp formating)

var version = require('version');
 
version.fetch('express', { from : /^/gi, to : "v" }, function(error, version) {
  if (error) {
    console.error(error);
  } else {
    console.log('express current version with formating:', version);
  };
});

Example (Current Projects package.json)

var version = require('version');
 
version.fetch(function(error, version) {
  if (error) {
    console.error(error);
  } else {
    console.log('`version` package current version:', version);
  };
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    6,460
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.2
    6,460
  • 0.1.1
    33
  • 0.1.0
    42
  • 0.0.4
    371
  • 0.0.3
    3
  • 0.0.1
    135

Package Sidebar

Install

npm i version

Weekly Downloads

3,338

Version

0.1.2

License

none

Last publish

Collaborators

  • edwardhotchkiss