# hashcoll-fast

> Fast hashset and hashmap implementation, written in Rust and compiled to Webassembly, based on hashbrown, a Rust port of Google's high-performance SwissTable hash map.

Latest version **1.1.0** (published 2020-02-28) · 0 weekly downloads

## Install

```sh
npm install hashcoll-fast
pnpm add hashcoll-fast
yarn add hashcoll-fast
bun add hashcoll-fast
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2020-02-28 |
| First published | 2020-02-28 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 43 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Maintainers | kenansulayman |

## Links

- npm: https://www.npmjs.com/package/hashcoll-fast
- Repository: https://github.com/styladev/hashcoll-fast
- Homepage: https://github.com/styladev/hashcoll-fast#readme
- Issues: https://github.com/styladev/hashcoll-fast/issues
- npm.io page: https://npm.io/package/hashcoll-fast

## Recent versions

- 1.1.0 (latest) — 2020-02-28
- 1.0.2 — 2020-02-28
- 1.0.1 — 2020-02-28
- 1.0.0 — 2020-02-28
- 0.1.0 — 2020-02-28

## README

# hashcoll-fast

Fast hashset and hashmap implementation, written in Rust and compiled to Webassembly, based on hashbrown, a Rust port of Google's high-performance SwissTable hash map. 

### Usage

```sh
$ yarn add hashcoll-fast
```

#### String

##### `HashSet<String>`

```javascript
const HashSet = require("hashcoll-fast").HashSet;

const set = new HashSet(4);

set.insert('foo');
set.insert('bar');

set.contains('foo'); // true
set.contains('tree'); // false

set.remove('foo');
```

##### `HashMap<String, String>`

```javascript
const HashMap = require("hashcoll-fast").HashMap;

const map = new HashMap(4);

map.insert('foo', 'bar');
map.insert('tree', 'house');

map.contains('foo'); // true
map.contains('zig'); // false

map.remove('foo'); // 'bar'
```

#### `Vec<u8>`

##### `HashSetRaw<Vec<u8>>`

```javascript
const HashSetRaw = require("./pkg").HashSetRaw;

const set = new HashSetRaw(4);

set.insert(Buffer.from('foo'));
set.insert(Buffer.from('bar'));

set.contains(Buffer.from('foo')); // true
set.contains(Buffer.from('tree')); // false

set.remove(Buffer.from('foo')); // Uint8Array(3) [ 102, 111, 111 ]
```

##### `HashMap<String, Vec<u8>>`

```javascript
const HashMapRaw = require("hashcoll-fast").HashMap;

const map = new HashMapRaw(4);

map.insert('foo', Buffer.from('bar'));
map.insert('tree', Buffer.from('house'));

map.get('foo'); // // Uint8Array(3) [ 102, 111, 111 ]
map.get('trexe'); // undefined

map.contains('foo'); // true
map.contains('zig'); // false

map.remove('foo'); // Uint8Array(3) [ 102, 111, 111 ]
```

### Build

```sh
$ make
```

---
_Source: https://npm.io/package/hashcoll-fast · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
