0.0.3 • Published 10 years ago

check-module-update v0.0.3

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

npm.io
npm.io npm.io npm.io npm.io npm.io npm.io


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 specamps@gmail.com

0.0.3

10 years ago

0.0.1

10 years ago