Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bloomfilter

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bloomfilter - npm Package Compare versions

Comparing version 0.0.14 to 0.0.15

ex.js

38

bloomfilter.js

@@ -37,3 +37,3 @@ (function(exports) {

// See http://willwhim.wordpress.com/2011/09/03/producing-n-hash-functions-by-hashing-only-once/
// See http://willwhim.wpengine.com/2011/09/03/producing-n-hash-functions-by-hashing-only-once/
BloomFilter.prototype.locations = function(v) {

@@ -94,18 +94,7 @@ var k = this.k,

function fnv_1a(v) {
var n = v.length,
a = 2166136261,
c,
d,
i = -1;
while (++i < n) {
c = v.charCodeAt(i);
if (d = c & 0xff000000) {
a ^= d >> 24;
a += (a << 1) + (a << 4) + (a << 7) + (a << 8) + (a << 24);
}
if (d = c & 0xff0000) {
a ^= d >> 16;
a += (a << 1) + (a << 4) + (a << 7) + (a << 8) + (a << 24);
}
if (d = c & 0xff00) {
var a = 2166136261;
for (var i = 0, n = v.length; i < n; ++i) {
var c = v.charCodeAt(i),
d = c & 0xff00;
if (d) {
a ^= d >> 8;

@@ -115,11 +104,6 @@ a += (a << 1) + (a << 4) + (a << 7) + (a << 8) + (a << 24);

a ^= c & 0xff;
// a = a * 16777619 mod 2**32
a += (a << 1) + (a << 4) + (a << 7) + (a << 8) + (a << 24);
}
// From http://home.comcast.net/~bretm/hash/6.html
a += a << 13;
a ^= a >> 7;
a += a << 3;
a ^= a >> 17;
a += a << 5;
return a & 0xffffffff;
return fnv_mix(a);
}

@@ -129,3 +113,7 @@

function fnv_1a_b(a) {
a += (a << 1) + (a << 4) + (a << 7) + (a << 8) + (a << 24);
return fnv_mix(a + (a << 1) + (a << 4) + (a << 7) + (a << 8) + (a << 24));
}
// See https://web.archive.org/web/20131019013225/http://home.comcast.net/~bretm/hash/6.html
function fnv_mix(a) {
a += a << 13;

@@ -132,0 +120,0 @@ a ^= a >> 7;

{
"name": "bloomfilter",
"version": "0.0.14",
"version": "0.0.15",
"description": "Fast bloom filter in JavaScript.",

@@ -5,0 +5,0 @@ "keywords": [

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