npm-package-versions

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


Keywords
npm, version, versions, api
License
MIT
Install
npm install npm-package-versions@1.0.1

Documentation

npm-package-versions

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

Build status js-standard-style

Installation

npm install npm-package-versions --save

Usage

var 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)
  })
})

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