Get the version numbers of a package from the npm registry
$ npm install --save pkg-versions
const pkgVersions = require('pkg-versions');
pkgVersions('ava').then(versions => {
console.log(versions);
//=> {'0.0.3', '0.0.4', ...}
});
Returns a promise for a Set
of versions.
- 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
MIT © Sindre Sorhus