fastbloom 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
Binary file
package/index.d.ts CHANGED
@@ -1,33 +0,0 @@
1
- /* tslint:disable */
2
- /* eslint-disable */
3
-
4
- /* auto-generated by NAPI-RS */
5
-
6
- export declare class BloomFilter {
7
- /**
8
- * Creates a new Bloom Filter with the specified capacity and false positive rate.
9
- * @param capacity - The expected number of items to be stored in the Bloom Filter.
10
- * @param false_positive_rate - The desired false positive rate (between 0 and 1).
11
- * @throws Will throw an error if the capacity is not greater than 0 or if the false positive rate is not between 0 and 1.
12
- * @returns A new instance of the Bloom Filter.
13
- */
14
- constructor(capacity: number, falsePositiveRate: number)
15
- /**
16
- * Adds an item to the Bloom Filter. This method is thread-safe and can be called concurrently from multiple threads.
17
- * @param item - The item to be added to the Bloom Filter.
18
- * @returns void
19
- */
20
- add(item: string): void
21
- /**
22
- * Checks if an item is possibly in the Bloom Filter. This method is thread-safe and can be called concurrently from multiple threads.
23
- * @param item - The item to be checked for membership in the Bloom Filter.
24
- * @returns A boolean indicating whether the item is possibly in the Bloom Filter (true) or definitely not in the Bloom Filter (false).
25
- */
26
- has(item: string): boolean
27
- /**
28
- * Adds multiple items to the Bloom Filter in parallel. This method is thread-safe and can be called concurrently from multiple threads.
29
- * @param items - An array of items to be added to the Bloom Filter.
30
- * @returns void
31
- */
32
- bulkAdd(items: Array<string>): void
33
- }
package/package.json CHANGED
@@ -1,32 +1,27 @@
1
1
  {
2
2
  "name": "fastbloom",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "High performance Bloom Filter implemented in Rust using fastbloom crate",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "build": "napi build --platform --release",
8
8
  "artifacts": "napi artifacts",
9
+ "dirs-setup": "napi create-npm-dirs",
9
10
  "test": "node test.js"
10
11
  },
11
- "devDependencies": {
12
- "@napi-rs/cli": "^2.18.0"
13
- },
14
12
  "files": [
15
13
  "index.js",
16
14
  "index.d.ts",
17
15
  "*.node"
18
16
  ],
19
17
  "napi": {
20
- "name": "fastbloom",
21
- "triples": {
22
- "defaults": true,
23
- "additional": [
24
- "x86_64-unknown-linux-musl",
25
- "aarch64-unknown-linux-gnu",
26
- "aarch64-apple-darwin",
27
- "aarch64-pc-windows-msvc"
28
- ]
29
- }
18
+ "binaryName": "fastbloom",
19
+ "targets": [
20
+ "x86_64-pc-windows-msvc",
21
+ "x86_64-apple-darwin",
22
+ "x86_64-unknown-linux-gnu",
23
+ "x86_64-unknown-linux-musl"
24
+ ]
30
25
  },
31
26
  "repository": {
32
27
  "type": "git",
@@ -35,5 +30,8 @@
35
30
  "publishConfig": {
36
31
  "access": "public",
37
32
  "provenance": true
33
+ },
34
+ "devDependencies": {
35
+ "@napi-rs/cli": "^3.5.1"
38
36
  }
39
37
  }