Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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

  • 0.2.0
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-75%
Maintainers
1
Weekly downloads
 
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 22 Jul 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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc