pkg-versions
TypeScript icon, indicating that this package has built-in type declarations

4.0.0 • Public • Published

pkg-versions

Get the version numbers of a package from the npm registry

Install

npm install pkg-versions

Usage

import packageVersions from 'pkg-versions';

console.log(await packageVersions('ava'));
//=> {'0.0.3', '0.0.4', …}

API

packageVersions(packageName)

Returns a Promise<Set<string>> with the versions.

packageName

Type: string

The name of the package to look up versions for.

Related

  • package-json - Get the package.json of a package from the npm registry
  • latest-version - Get the latest version of an npm package
  • npm-keyword - Get a list of npm packages with a certain keyword
  • npm-user - Get user info of an npm user
  • npm-email - Get the email of an npm user

Package Sidebar

Install

npm i pkg-versions

Weekly Downloads

493

Version

4.0.0

License

MIT

Unpacked Size

3.5 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus