Have ideas to improve npm?Join in the discussion! »

    @albert-team/rebloom
    TypeScript icon, indicating that this package has built-in type declarations

    2.5.0 • Public • Published

    REBLOOM

    Minimalistic RedisBloom client for Node.js.

    Installation

    Requirements

    Instructions

    With npm

    npm i @albert-team/rebloom

    With yarn

    yarn add @albert-team/rebloom

    Usage

    Important:

    • Rebloom v2 is nearly a rewrite from scratch, thus not backward-compatible with Rebloom v1.
    • RedisBloom module needs to be loaded into Redis server beforehand.

    Get Started

    const { BloomFilter } = require('@albert-team/rebloom')
    
    const main = async () => {
      const filter = new BloomFilter('filtername', {
        host: 'localhost',
        port: 6379,
        redisClientOptions: { password: 'scrtpassword' },
      })
      await filter.connect()
    
      console.log(await filter.add('item0')) // 1
      console.log(await filter.exists('item0')) // 1
      console.log(await filter.exists('item1')) // 0
    
      await filter.disconnect()
    }
    
    main().catch((err) => console.error(err))

    API

    Read more here.

    Changelog

    Read more here.

    Install

    npm i @albert-team/rebloom

    DownloadsWeekly Downloads

    29

    Version

    2.5.0

    License

    MIT

    Unpacked Size

    23.9 kB

    Total Files

    18

    Last publish

    Collaborators

    • avatar