npm-package-stars

1.0.0 • Public • Published

npm-package-stars Build Status

Get the stars of a npm package

Install

$ npm install --save npm-package-stars

Usage

const npmPackageStars = require('npm-package-stars');
 
npmPackageStars('chalk').then(stars => {
    console.log(stars);
    //=> 329
});
 
npmPackageStars.users('chalk').then(users => {
    console.log(users);
    //=> ['passy', 'michaelsbradleyjr', 'jamescostian', ...]
});

API

npmPackageStars(package)

Returns a promise that resolves into the number of stars.

package

Type: string

Package to fetch stars from.

.users(package)

Returns a promise that resolves into an array of users starring the package.

package

Type: string

Package to fetch users starring the package from.

License

MIT © Andreas Gillström

Package Sidebar

Install

npm i npm-package-stars

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • gillstrom