latest-version
Get the latest version of an npm package
Last updated 6 months ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install latest-version 
SYNC missed versions from official npm registry.

latest-version Build Status

Get the latest version of an npm package

Fetches the version directly from the registry instead of depending on the massive npm module like the latest module does.

Install

$ npm install latest-version

Usage

const latestVersion = require('latest-version');

(async () => {
	console.log(await latestVersion('ava'));
	//=> '0.18.0'

	console.log(await latestVersion('@sindresorhus/df'));
	//=> '1.0.1'

	// Also works with semver ranges and dist-tags
	console.log(await latestVersion('npm', {version: 'latest-5'}));
	//=> '5.5.1'
})();

Related

License

MIT © Sindre Sorhus

Current Tags

  • 5.1.0                                ...           latest (6 months ago)

12 Versions

  • 5.1.0                                ...           6 months ago
  • 5.0.0                                ...           6 months ago
  • 4.0.0                                ...           a year ago
  • 3.1.0                                ...           2 years ago
  • 3.0.0                                ...           3 years ago
  • 2.0.0                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.2                                ...           5 years ago
  • 0.1.1                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 6,604
This Week 30,157
This Month 114,632
Last Day 8,065
Last Week 36,099
Last Month 198,934
Dependencies (1)
Dev Dependencies (5)
Dependents (402)

Copyright 2014 - 2017 © taobao.org |