check-module-update
v0.0.3
Published
Makes sure users stay up to date with your module!
Downloads
4
Readme
Keep users on track
Programmatically inform users of new updates of your module. This package query's the npm registry on a update check with a defined set of options.
Getting Started
1. Start by installing the package:
npm install check-module-update
2. Do awesome stuff!
updateCheck.check({
timeout: 1000, // Normal timeout in milliseconds of a npm registry request
output: true, // Display output when a new version is availible
count: 0, // Number of retries of a npm registry request
factor: 0, // This does... well.. uhm.. factoring
minTimeout: 150, // Min timeout in milliseconds for a npm registry request
maxTimeout: 500, // Max timeout in milliseconds for a npm registry request
}, (err, newUpdate) => {
if (err)
throw new Error(err)
if (newUpdate)
console.log('update notification has been displayed to the user!')
if (!newUpdate)
console.log('No new update available...')
})
Contact
You can contact me at [email protected]