Socket
Book a DemoInstallSign in
Socket

npm-package-versions

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

npm-package-versions

Get an array of all available versions of a given npm package

latest
Source
npmnpm
Version
2.0.3
Version published
Maintainers
1
Created
Source

npm-package-versions

Get an array of all available versions of a given npm package.

js-standard-style

Installation

npm install npm-package-versions --save

Usage

const pkgVersions = require('npm-package-versions')

pkgVersions('bonjour', function (err, versions) {
  if (err) throw err
  console.log('Bonjour package versions available:')
  versions.forEach(function (version) {
    console.log('- %s', version)
  })
})

Optionally supply a custom registry URL (will default to https://registry.npmjs.org if not provided):

pkgVersions('bonjour', 'https://registry.example.com', function (err, versions) {
  // ...
})

API

pgkVersions.uri

Set this property to overwrite the default registry URI.

Defaults to https://registry.npmjs.org/

pkgVersions.params

Set the property to overwrite the default npm-registry-client params for client.get.

Defaults to {}.

License

MIT

Keywords

npm

FAQs

Package last updated on 13 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts