check-module-update

0.0.3 • Public • Published



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

Readme

Keywords

none

Package Sidebar

Install

npm i check-module-update

Weekly Downloads

0

Version

0.0.3

License

MIT

Last publish

Collaborators

  • michaeldegroot