
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
A JavaScript module to compare the similarity between two strings. It returns a value between 0 and 1 indicating how similar the shorter string is to the larger string.
Install via npm:
npm install how-close
const HowClose = require("how-close");
const comparison = new HowClose("kitten", "sitting");
console.log(comparison.percentage); // Similarity score
console.log(comparison.contains); // Whether the first string contains the second string
HowClose(s1, s2) Creates a new instance of the HowClose class.
s1: First string.s2: Second string.percentage: A value between 0 and 1 indicating the similarity between the two strings.contains: A boolean indicating whether the first string contains the second string.
Examplesimilarity(s1, s2): A function to reinitialise the object with a new percentage.const HowClose = require("how-close");
const comparison1 = new HowClose("hello world", "hello");
console.log(comparison1.percentage); // 0.5
console.log(comparison1.contains); // true
const comparison2 = new HowClose("large string example", "large");
console.log(comparison2.percentage); // 0.25
console.log(comparison2.contains); // true
const comparison3 = new HowClose("large", "large string example");
console.log(comparison3.percentage); // 0.25
console.log(comparison3.contains); // false
FAQs
Compare the similarity between two strings with JavaScript.
We found that how-close demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.