Skip to content

JavaScript bloomfilter using fastest hash algo xxHash for browsers

License

Notifications You must be signed in to change notification settings

valentinvichnal/bloomfilters.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bloomfilters.js

bloomfilter.js - usage:

To create a filter, pass an options hash to the constructor:

initialize

var options = {
	bits: 1024,
	hashes: 7,
	seeds: [1, 2, 3, 4, 5, 6, 7]
};

filter = new BloomFilter(options);

add()

filter.add('cat');

Adds the given item to the filter. Can also accept buffers and arrays containing strings or buffers:

filter.add(['cat', 'dog', 'coati', 'red panda']);

has()

To test for membership:

filter.has('dog');

About

JavaScript bloomfilter using fastest hash algo xxHash for browsers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published