chabrador
Version:
A key-incrementer database stored in memory.
54 lines (32 loc) • 1.14 kB
Markdown

<br>
**Chabrador** is a **key-incrementer database** with persistent memory across process resets.
- **In-Memory Data Handling** – Memory persists when process resets.
- **Overflow Protection** – Limits can be applied to stop theoretical endless growth.
```bash
npm install chabrador
```
```js
import { adopt } from 'chabrador';
const chabrador = await adopt({
filePath: 'data.json',
backupInterval: 600000, // 10 minutes
maxEntries: 100000,
logger: console,
});
chabrador.boop('unique-id');
```
Increments a key value by 1 If the key exists otherwise it creates a new entry set at 0. The timestamp of the last boop is recorded.
Creates a new Chabrador instance and initializes memory from a file.
[](https://github.com/alexstevovich/chabrador)
_This link might become chabrador-node in the future if conflicts arise._
Licensed under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).