UNPKG

npm-auto-update

Version:

check for update and update npm dependencies

18 lines (16 loc) 559 B
# npm-auto-update :dizzy: 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) => { }); } }); ```