New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

blomma

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blomma - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

3

blomma.js

@@ -57,2 +57,5 @@ var FNV = require('fnv').FNV

return extend(buf)
},
clone: function (filter) {
return extend(new Buffer(filter))
}

@@ -59,0 +62,0 @@ }

2

package.json
{
"name": "blomma",
"version": "0.1.0",
"version": "0.2.0",
"description": "Bloom filters yet again",

@@ -5,0 +5,0 @@ "main": "blomma.js",

@@ -20,4 +20,2 @@ # blomma

## api
### bloom

@@ -31,4 +29,8 @@

#### merge (filter a, filter b)
#### clone (filter)
Returns a clone
#### merge (filter1, filter2)
Returns a filter that is a and b merged together with OR

@@ -38,13 +40,13 @@

#### add (string/buffer value)
#### add (string)
Adds the value to the bloom filter
Adds the string to the bloom filter
#### has (string/buffer value)
#### has (string)
Returns false if not in the set, true if it might be
#### contains (filter subset)
#### contains (subset)
Returns true if `subset` is a subset of the filter, i.e, contains everything that subset contains (and possibly more)
Returns true if the filter contains everything that `subset` contains (and possibly more)

@@ -51,0 +53,0 @@ # License

@@ -105,2 +105,16 @@ 'use strict'

})
describe('cloning', function () {
var f1 = bloom.empty()
f1.add('oho')
var f2 = bloom.clone(f1)
f2.add('aha')
it('should have cloned the filter', function () {
assert(f1.has('oho'))
assert(f2.has('oho'))
assert(!f1.has('aha'))
assert(f2.has('aha'))
})
})
})
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