$ cnpm install npm-package-versions
Get an array of all available versions of a given npm package.
npm install npm-package-versions --save
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)
})
})
pgkVersions.uriSet this property to overwrite the default registry URI.
Defaults to https://registry.npmjs.org/
pkgVersions.paramsSet the property to overwrite the default
npm-registry-client
params for
client.get.
Defaults to {}.
MIT
Copyright 2013 - present © cnpmjs.org | Home |