npm-pkg-versions
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

npm-pkg-versions

Installation

tool command
yarn yarn add npm-pkg-versions
npm npm install --save npm-pkg-versions

Usage

The usage of this package is very simple, as it only exports one function that you pass the packageName to. The function will return null if the specified package wasn't found, otherwise it will return an array of versions (strings).

import listPackageVersions from 'npm-pkg-versions';
 
async function main() {
    const versions = await listPackageVersions('npm-pkg-versions');
    console.log(versions); // => ['0.0.0', '1.0.0', ...]
}
 
main().catch((err) => console.error(err));

This project was developed at Sport-Thieme.

Package Sidebar

Install

npm i npm-pkg-versions

Weekly Downloads

10

Version

1.1.1

License

MIT

Unpacked Size

6.19 kB

Total Files

5

Last publish

Collaborators

  • kldzj