Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

blomma

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blomma

Bloom filters yet again

latest
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

blomma

Bloom filters in javascript yet again.

I wanted something that used buffers directly, and that also supports merging and subset tests.

usage

var bloom = require('blomma')(32, 3)

var filter = bloom.empty()

filter.add('hello')

filter.has('hello') // => true
filter.has('goodbye') // => false

bloom

The top level object methods:

empty()

Returns a new empty filter

clone (filter)

Returns a clone

merge (filter1, filter2)

Returns a filter that is a and b merged together with OR

filter

add (string)

Adds the string to the bloom filter

has (string)

Returns false if not in the set, true if it might be

contains (subset)

Returns true if the filter contains everything that subset contains (and possibly more)

License

MIT

FAQs

Package last updated on 30 Aug 2015

Did you know?

Socket

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.

Install

Related posts