kol

kolekto

Collection of datastructures and algorithims for typescript.

Showing:

Popularity

Downloads/wk

10

GitHub Stars

2

Maintenance

Last Commit

4yrs ago

Contributors

1

Package

Dependencies

1

Size (min+gzip)

0.2KB

License

MIT

Type Definitions

Built-In

Tree-Shakeable

No?

Categories

Readme

Kolekto

Collections and datastructures library for Typescript ( and javascript).

Status

master: CircleCI

Index

Installation

npm install kolekto 

Import the parts you want.

import {BloomFilter} from "kolekto"

let filter = new BloomFilter<string>(10000, 0.03);

Collections

BitArray

BloomFilter

A Bloom filter is a space-efficient probabilistic data structure that is used to test whether an element is a member of a set.

False positives are possible but false negatives not. In laymen's terms this means that an element maybe be in the set or definitely not in the set. The underlying hash function is the Google's FarmHash family of hash functions. By using the the C implementation of farmhash a high insertion rate can be achieved.

The interface is modeled after the BloomFilter in the Google Guava library.

Example:

import {BloomFilter} from "kolekto"

// Create a bloomfilter with 10000 expected insertions and false positive probability of 3%
let filter = new BloomFilter<string>(10000, 0.03);

// Put item in bloomfilter
filter.put("test");

// Check if item is in bloom filter, return true if it might contain element
let result = filter.mightContain("test"); 

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100