package-version

1.0.0 • Public • Published

NPM version Build Status Dependency Status

package-version

Get the version of a package from package.json

Installation

npm install package-version --save

version(cwd, callback);

var version = require('package-version');
version('/path/to', function(err, version){
  if(err){
    console.log('error:', err.stack);
    return;
  }
  console.log('version:', version);
});
  • cwd path the directory of the package
  • callback function(err, version)

Readme

Keywords

Package Sidebar

Install

npm i package-version

Weekly Downloads

3

Version

1.0.0

License

MIT

Last publish

Collaborators

  • kael