{{#block "logo"}}{{/block}} ## What does this module do? This module will return the latest (or newest) package.json file for a specified module. The `getLatest` function requires the current package.json file to be able to compare versions and return the current package.json if the latest hasn't been downloaded yet. The first use of `get-latest` will always return the current package.json because the latest has not been downloaded. Once the latest is downloaded and cached, then the latest version will be returned. This is intended to be used by CLIs and applications that want to quickly check for the latest version without blocking execution, but still download the latest to be used during the next execution of the CLI or application. ## Usage ```js var pkg = require('./package.json'); var getLatest = require('{%= name %}'); var latest = getLatest(pkg); console.log('current', pkg.version); console.log('latest', latest.version); //=> 'current 0.1.0' //=> 'latest' 0.2.0' ``` ## API {%= apidocs('index.js') %}