Simple update notifier to check for npm updates for cli applications
npm install simple-update-notifier





Simple update notifier to check for npm updates for cli applications.

Checks for updates for an npm module and outputs to the command line if there is one available. The result is cached for the specified time so it doesn't check every time the app runs.
``bash`
npm install simple-update-notifier
OR
yarn add simple-update-notifier
`js
import updateNotifier from 'simple-update-notifier';
import packageJson from './package.json' assert { type: 'json' };
updateNotifier({ pkg: packageJson });
`
#### pkg
Type: object
##### name
_Required_\
Type: string
##### version
_Required_\
Type: string
#### updateCheckInterval
Type: number\1000 60 60 * 24
Default: _(1 day)_
How often to check for updates.
#### shouldNotifyInNpmScript
Type: boolean\false
Default:
Allows notification to be shown when running as an npm script.
#### distTag
Type: string\'latest'
Default:
Which dist-tag to use to find the latest version.
#### alwaysRun
Type: boolean\false
Default:
When set, updateCheckInterval will not be respected and a check for an update will always be performed.
#### debug
Type: boolean\false
Default:
When set, logs explaining the decision will be output to stderr` whenever the module opts to not print an update notification