Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
npm-keyword
Advanced tools
The npm-keyword package allows you to search for npm packages by keyword. It provides a simple API to fetch packages that match a given keyword, making it easier to discover related packages.
Search for packages by keyword
This feature allows you to search for npm packages that match a specific keyword. The code sample demonstrates how to use the npm-keyword package to find all packages related to the keyword 'gulpplugin'.
const keyword = require('npm-keyword');
(async () => {
const packages = await keyword('gulpplugin');
console.log(packages);
})();
Search for package names by keyword
This feature allows you to search for the names of npm packages that match a specific keyword. The code sample demonstrates how to use the npm-keyword package to find the names of all packages related to the keyword 'gulpplugin'.
const keyword = require('npm-keyword');
(async () => {
const packageNames = await keyword.names('gulpplugin');
console.log(packageNames);
})();
Search for package count by keyword
This feature allows you to get the count of npm packages that match a specific keyword. The code sample demonstrates how to use the npm-keyword package to find the number of packages related to the keyword 'gulpplugin'.
const keyword = require('npm-keyword');
(async () => {
const count = await keyword.count('gulpplugin');
console.log(count);
})();
The package-json package allows you to get metadata of a package from the npm registry. While npm-keyword focuses on searching packages by keyword, package-json provides detailed information about a specific package, such as its version, dependencies, and more.
The npm-registry-fetch package is a low-level utility for fetching resources from the npm registry. It provides more granular control over the requests made to the registry compared to npm-keyword, which is more specialized in keyword-based searches.
The npms package is a client for the npms.io API, which provides a higher-level search and analysis of npm packages. It offers more advanced search capabilities and package scoring compared to the simpler keyword-based search provided by npm-keyword.
Get a list of npm packages with keywords
npm install npm-keyword
import {npmKeyword, npmKeywordNames, npmKeywordCount} from 'npm-keyword';
console.log(await npmKeyword('gulpplugin'));
//=> [{name: 'gulp-autoprefixer', description: '…'}, …]
console.log(await npmKeywordNames('gulpplugin'));
//=> ['gulp-autoprefixer', …]
console.log(await npmKeywordCount('gulpplugin'));
//=> 3457
The list of packages will contain a maximum of 250 packages matching the keywords. This limitation is caused by the npm registry API.
Returns a promise for a list of packages having the specified keyword in their package.json keywords
property.
Type: string | string[]
Example: ['string', 'camelcase']
One or more keywords. Only matches packages that have all the given keywords.
Type: object
Type: number
Default: 250
Limits the amount of results.
Returns a promise for a list of package names.
Type: string | string[]
Example: ['string', 'camelcase']
One or more keywords. Only matches packages that have all the given keywords.
Type: object
Type: number
Default: 250
Limits the amount of results.
Returns a promise for the count of packages.
Type: string | string[]
Example: ['string', 'camelcase']
One or more keywords. Only matches packages that have all the given keywords.
FAQs
Get a list of npm packages with keywords
The npm package npm-keyword receives a total of 171,488 weekly downloads. As such, npm-keyword popularity was classified as popular.
We found that npm-keyword demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.