Skip to content
Bloom filter and Cuckoo filter for Node.js using Redis with RedisBloom module
Branch: master
Clone or download
Latest commit 7f7b4a4 Jul 4, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Add basic CountMinSketch Jul 3, 2019
.eslintrc.json Add TypeScript Jun 21, 2019
.gitignore Add TypeScript Jun 21, 2019
.prettierrc.json Add BloomFilter and CuckooFilter Feb 28, 2019
CHANGELOG.md Bump version to 1.1.0 Apr 26, 2019
LICENSE Initial commit Feb 26, 2019
README.md Bump version to 1.0.0 Mar 18, 2019
package.json Add TypeScript Jun 21, 2019
tsconfig.json Convert all files to TypeScript Jun 21, 2019
yarn.lock Add TypeScript Jun 21, 2019

README.md

REBLOOM

Bloom filter and Cuckoo filter for Node.js using Redis with RedisBloom module

Installation

Requirements

  • Node.js >= 8.0.0
  • Redis >= 4.0
  • RedisBloom >= 1.1.0

Instructions

  • With npm:
npm i @albert-team/rebloom
  • With yarn:
yarn add @albert-team/rebloom

Usage

Important: RedisBloom module needs to be loaded into Redis server beforehand.

const { BloomFilter } = require('@albert-team/rebloom')

const main = async () => {
  const filter = new BloomFilter('filtername')
  await filter.connect()

  console.log(await filter.add('item0'))
  console.log(await filter.exists('item0'))
  console.log(await filter.addMany('item1', 'item2'))
  console.log(await filter.exists('item1'))
  console.log(await filter.exists('item3'))

  await filter.disconnect()
}

main()

Changelog

Read more here.

You can’t perform that action at this time.