@types/bloomfilter
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

Installation

npm install --save @types/bloomfilter

Summary

This package contains type definitions for bloomfilter (https://github.com/jasondavies/bloomfilter.js).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bloomfilter.

index.d.ts

export class BloomFilter {
    buckets: Int32Array;

    /**
     * Create a new empty bloom filter of size m with hashes k or
     * provide buckets as a number[] or Int32Array to deserialize a bloom filter
     * @param mOrBucketsArray number of bits (will be rounded up to nearest 32), or buckets
     * to deserialize into a filled bloomfilter
     * @param k number of hashes
     */
    constructor(m: number | number[] | Int32Array, k: number);

    /**
     * Add a value to a bloom filter
     * @param value
     */
    add(value: any): void;

    /**
     * Test whether a value exists in a bloom filter. (False positives are
     * possible, false negatives are not.)
     */
    test(value: any): boolean;
}

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:04 GMT
  • Dependencies: none

Credits

These definitions were written by slawiko.

/@types/bloomfilter/

    Package Sidebar

    Install

    npm i @types/bloomfilter

    Weekly Downloads

    1,032

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    3.99 kB

    Total Files

    5

    Last publish

    Collaborators

    • types