update-checker

0.0.2 • Public • Published

update-checker Build Status

Check if there's an update available for a package on NPM.

Install

npm install update-checker

API

updateChecker.checkForUpdate(packageName, installedVersion)

Example

var updateChecker = require("update-checker");
var pkgJson = require("package.json");
 
updateChecker.checkForUpdate("browser-sync", pkgJson.version).then(function (newer) {
    if (newer) {
        // There's a newer version available
        // Prompt your users to upgrade.
    } else {
        // Package is up-to-date
    }
}).fail(function (errorMsg) {
    console.log(errorMsg);
});

License

Copyright (c) 2013 Shane Osbourne Licensed under the MIT license.

Readme

Keywords

none

Package Sidebar

Install

npm i update-checker

Weekly Downloads

2

Version

0.0.2

License

none

Last publish

Collaborators

  • shakyshane