Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including latest-version with all npm packages installed. Try it out:

var latestVersion = require("latest-version")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

latest-version v3.1.0

Get the latest version of an npm package

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 --save latest-version

Usage

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

latestVersion('ava').then(version => {
    console.log(version);
    //=> '0.18.0'
});

latestVersion('@sindresorhus/df').then(version => {
    console.log(version);
    //=> '1.0.1'
});

Related

License

MIT © Sindre Sorhus

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free