Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

get-published-version

albinopython6MIT1.0.6TypeScript support: included

Gets the currently published version of a package

readme

get-published-version

Small utility that retrieves the latest version of a module published to npmjs.

NOTE: Future versions will allow you to specify a registry.

Install

npm install -g get-published-version

Programmatic Use

Command Line

get-published-version <module name>

Node

const getVersion = require('get-published-version');

getVersion('get-published-version')
  .then(version => console.log(version));