bloomfilter
Advanced tools
Comparing version 0.0.5 to 0.0.6
@@ -47,4 +47,5 @@ (function(exports) { | ||
k = this.k, | ||
m = this.m, | ||
buckets = this.buckets; | ||
while (++i < k) buckets[Math.floor(l[i] / k)] |= 1 << (l[i] % k) | ||
while (++i < k) buckets[Math.floor(l[i] / m)] |= 1 << (l[i] % m); | ||
}; | ||
@@ -54,10 +55,10 @@ | ||
var l = this.locations(v), | ||
n = l.length, | ||
i = -1, | ||
k = this.k, | ||
m = this.m, | ||
b, | ||
buckets = this.buckets; | ||
while (++i < n) { | ||
while (++i < k) { | ||
b = l[i]; | ||
if ((buckets[Math.floor(b / k)] & (1 << (b % k))) === 0) { | ||
if ((buckets[Math.floor(b / m)] & (1 << (b % m))) === 0) { | ||
return false; | ||
@@ -64,0 +65,0 @@ } |
{ | ||
"name": "bloomfilter", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "Fast bloom filter in JavaScript.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5342
93