npm.io
1.1.3 • Published 9 years ago

npm-auto-update

Licence
ISC
Version
1.1.3
Deps
1
Vulns
0
Weekly
0

npm-auto-update

JavaScript interface to programmically update your application from npm

Features

Checks if the version on npm is newer then you'r local version (from package.json). if true its possible todo a global update

Constructor

Pass a log object e.g. console

const npmAutoUpdate = new (require('npm-auto-update'))(console);
npmAutoUpdate.checkForUpdate((error, result) => {
            if(result) {
                this.npmAutoUpdate.updatePackage((error, result) => {
                });
            }
});

Keywords