npm-package-versions
v1.0.1
Published
Get an array of all available versions of a given npm package
Downloads
15,934
Readme
npm-package-versions
Get an array of all available versions of a given npm package.
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