check-update
v0.0.8
Published
Check if there are a update
Downloads
143
Maintainers
Readme
check-update
Check if there are a update.
npm install --save check-update
Example
var checkUpdate = require('check-update');
var pkg = require('./package.json');
checkUpdate({packageName: pkg.name, packageVersion: pkg.version, isCLI: true}, function(err, latestVersion, defaultMessage){
if(!err){
console.log(defaultMessage);
}
});
Options
packageName
Required
Type: string
Define the package name for search in NPM.
packageVersion
Required if you want a default message
Type: string
Define the version currently installed.
isCLI
Type: boolean
Default: false
Define if your package is a cli.