jasondavies / bloomfilter.js

JavaScript bloom filter using FNV for fast hashing
http://www.jasondavies.com/bloomfilter/
BSD 3-Clause "New" or "Revised" License
759 stars 79 forks source link

Added support for estimating the number of items in the filter #8

Closed eugeneware closed 11 years ago

eugeneware commented 11 years ago

Turned out to pretty easy to add an items estimate. I've implemented it as an items() function and included some basic tests.

jasondavies commented 11 years ago

Thanks! I renamed items() to size() as I think it’s clearer, and tweaked the code a bit.