Get a list of npm packages with a certain keyword
$ npm install --save npm-keyword
const npmKeyword = require('npm-keyword');
npmKeyword('gulpplugin').then(packages => {
console.log(packages);
//=> [{name: 'gulp-autoprefixer', description: '...'}, ...]
});
npmKeyword.names('gulpplugin').then(packageNames => {
console.log(packageNames);
//=> ['gulp-autoprefixer', ...]
});
npmKeyword.count('gulpplugin').then(count => {
console.log(count);
//=> 1930
});
Returns a promise for a list of packages having the specified keyword in their package.json keyword
property.
Returns a promise for a list of package names. Use this if you don't need the description as it's faster.
Returns a promise for the count of packages.
- package-json - Get the package.json of a package from the npm registry
- npm-user - Get user info of an npm user
- npm-email - Get the email of an npm user
MIT © Sindre Sorhus