npm-pack-count
MIT License
We use this URL to get the number of npm package downloads.
https://api.npmjs.org/downloads/point/${start}:${end}/${packageName}
npm i @yunseorim1116/npm-pack-count
yarn add @yunseorim1116/npm-pack-count
pnpm i @yunseorim1116/npm-pack-count
(async () => {
const packages = ['axios', '@types/axios'];
const numberOfWeeks = 6;
// The first argument is an array of package names, the second argument is the desired number of weeks
const tracker = new DownloadTracker(packages, numberOfWeeks);
const datas = await tracker.start();
console.log(datas);
})();