Class: BloomFilter

BloomFilter(sizeopt, sizeopt)

BloomFilter Class Represents a BloomFilter Object

Constructor

new BloomFilter(sizeopt, sizeopt)

BloomFilter Constructor
Parameters:
Name Type Attributes Default Description
size number <optional>
512 Number of elements in the Bloom Filter, default 512
size number <optional>
3 Number of rounds of hashing, default 3
Source:

Methods

add(input)

Add a new element to the Bloom Filter
Parameters:
Name Type Description
input string Element to add - If array is provided all the elements will be added
Source:

has(input) → {boolean}

Returns if element may be present in the Bloom Filter
Parameters:
Name Type Description
input string Element to check - If array is provided all the elements will be checked
Source:
Returns:
- True - If element may be present, False if element is definitely not present, if array was provided an boolean array will be returned
Type
boolean