1.0.0 • Published 8 years ago

npm-package-stars v1.0.0

Weekly downloads
5
License
MIT
Repository
github
Last release
8 years ago

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