Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
fuzzysearch
Advanced tools
Tiny and blazing-fast fuzzy search in JavaScript
Fuzzy searching allows for flexibly matching a string with partial input, useful for filtering data very quickly based on lightweight user input.
To see fuzzysearch
in action, head over to bevacqua.github.io/horsey, which is a demo of an autocomplete component that uses fuzzysearch
to filter out results based on user input.
From npm
npm install --save fuzzysearch
fuzzysearch(needle, haystack)
Returns true
if needle
matches haystack
using a fuzzy-searching algorithm. Note that this program doesn't implement levenshtein distance, but rather a simplified version where there's no approximation. The method will return true
only if each character in the needle
can be found in the haystack
and occurs after the preceding character.
fuzzysearch('twl', 'cartwheel') // <- true
fuzzysearch('cart', 'cartwheel') // <- true
fuzzysearch('cw', 'cartwheel') // <- true
fuzzysearch('ee', 'cartwheel') // <- true
fuzzysearch('art', 'cartwheel') // <- true
fuzzysearch('eeel', 'cartwheel') // <- false
fuzzysearch('dog', 'cartwheel') // <- false
An exciting application for this kind of algorithm is to filter options from an autocomplete menu, check out horsey for an example on how that might look like.
RegExp
s...!MIT
FAQs
Tiny and blazing-fast fuzzy search in JavaScript
The npm package fuzzysearch receives a total of 94,137 weekly downloads. As such, fuzzysearch popularity was classified as popular.
We found that fuzzysearch 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.