
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
keywords-search
Advanced tools
Search keywords in a string and return a relevancy score.
npm i --save keywords-search
import search from 'keywords-search';
search( search: string, subject: string ): {
// Score of relevancy (between 0 and 100)
score: number,
// The minimum score you will get if at least each keyword is contained in the subject string
minAcceptableScore: number,
// The list of search string that have been matched
keywords: {
keyword: string,
score: number,
position: number
}[],
};
search("quality data analyst", "quality data analyst");
{
"keywords": [
{
"keyword": "data quality analyst",
"score": 9,
"position": 0
}
],
"score": 100,
"minAcceptableScore": 3,
}
search("data quality analyst", "quality data analyst");
{
"keywords": [
{
"keyword": "data",
"score": 0.6,
"position": 8
},
{
"keyword": "quality",
"score": 1,
"position": 0
},
{
"keyword": "analyst",
"score": 0.35,
"position": 13
}
],
"score": 21.67,
"minAcceptableScore": 3,
}
FAQs
Extract root domain name from an URL.
The npm package keywords-search receives a total of 2 weekly downloads. As such, keywords-search popularity was classified as not popular.
We found that keywords-search demonstrated a not healthy version release cadence and project activity because the last version was released 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
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.