@accumulators/core
Advanced tools
Comparing version 4.2.1 to 4.2.3
{ | ||
"name": "@accumulators/core", | ||
"version": "4.2.1", | ||
"version": "4.2.3", | ||
"description": "A collection of TypeScript accumulators packages, each using the core package", | ||
@@ -28,3 +28,3 @@ "keywords": [], | ||
}, | ||
"gitHead": "fc93df901b034d5cc65a0d283ef5388128fab257" | ||
"gitHead": "beb68310fd4bf0e8204d77137abea949633af06b" | ||
} |
# `core` | ||
> TODO: write description | ||
## `Store` | ||
## Usage | ||
Store is a class that provides a simple interface for storing and retrieving key-value pairs. | ||
Store has the following interface: | ||
```typescript | ||
interface IStore { | ||
get(key: string): Promise<string | undefined>; | ||
getMany(keys: string[]): Promise<Map<string, string>>; | ||
set(key: string, value: string): Promise<void>; | ||
setMany(values: Map<string, string>): Promise<void>; | ||
delete(key: string): Promise<void>; | ||
deleteMany(keys: string[]): Promise<void>; | ||
} | ||
``` | ||
import CoreMMR from '@accumulators/core'; | ||
// TODO: demonstrate usage | ||
``` | ||
## Implementations | ||
Store can be implemented in many different ways, for example in memory or database. | ||
Currently there are three implementations: | ||
- [`@accumulators/memory`](../memory/README.md) | ||
- [`@accumulators/rocksdb`](../rocksdb/README.md) | ||
- [`@accumulators/sqlite3`](../sqlite3/README.md) | ||
You can also implement your own store. Just write a class that implements `IStore` interface and you are good to go. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11483
33