
Security News
/Research
npm Phishing Email Targets Developers with Typosquatted Domain
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.
@duckduckgo/jsbloom
Advanced tools
#jsbloom
A fast bloom filter implementation in JavaScript using the djb2 and sdbm algorithms.
From Less Hashing, Same Performance: Building a Better Bloom Filter by Adam Kirsch et al, it is possible to build k hash values from only 2 unique values. Hence, it is sufficient to have two unique hashes generated.
var filter = new JSBloom(items, false_probability_chance);
filter.addEntry("xyz");
filter.checkEntry("xyz"); // returns true
filter.checkEntry("yz"); // returns false
Testing is done with mocha and chai
npm install mocha chai
mocha
items: ceiling of entries to add
false_probability_chance: chance of false positives to occur
JSBloom will automatically generate the needed bit array and amount of hashes needed to meet your requirements.
addEntry(str): adds str to bloom filter
addEntries(arr): iterates over arr and adds every entry within
checkEntry(str): checks if str in filter, returns false if definitely not, true if maybe
importData(base64, [number_of_hashes]): loads a base 64 LZW compressed Uint8Array
exportData(): returns base 64 encoded Uint8Array LZW as string
exportData(callback): returns the base 64 encoded Uint8Array LZW compressed to provided callback
FAQs
a fast javascript counting bloom filter implementation
The npm package @duckduckgo/jsbloom receives a total of 263 weekly downloads. As such, @duckduckgo/jsbloom popularity was classified as not popular.
We found that @duckduckgo/jsbloom demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.
Security News
Knip hits 500 releases with v5.62.0, refining TypeScript config detection and updating plugins as monthly npm downloads approach 12M.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.