# cryptedjsondb

> Simple JSON database using crypto-js

Latest version **1.1.3** (published 2023-11-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install cryptedjsondb
pnpm add cryptedjsondb
yarn add cryptedjsondb
bun add cryptedjsondb
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2023-11-18 |
| First published | 2023-02-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | scar17off |
| Maintainers | scar17off |
| Keywords | database, db, jsondb, json, cryptojs, cryptedjsondb |

## Links

- npm: https://www.npmjs.com/package/cryptedjsondb
- Repository: https://github.com/scar17off/CryptedJSONdb
- Homepage: https://github.com/scar17off/CryptedJSONdb#readme
- Issues: https://github.com/scar17off/CryptedJSONdb/issues
- npm.io page: https://npm.io/package/cryptedjsondb

## Dependencies (1)

- [crypto-js](https://npm.io/package/crypto-js.md) ^4.1.1

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.1.3 (latest) — 2023-11-18
- 1.1.2 — 2023-11-18
- 1.1.1 — 2023-11-18
- 1.1.0 — 2023-09-26
- 1.0.9 — 2023-06-03
- 1.0.8 — 2023-06-03
- 1.0.7 — 2023-06-03
- 1.0.6 — 2023-06-03
- 1.0.5 — 2023-02-22
- 1.0.4 — 2023-02-22
- 1.0.3 — 2023-02-21
- 1.0.2 — 2023-02-21
- 1.0.0 — 2023-02-21

## README

# CryptedJSONdb
CryptedJSONdb is a module for Node.js that provides an easy and convenient way to open and retrieve JSON data.
<br/>
It includes methods for setting and discovering by keys and uses secure data encryption with crypto-js encryption.
<br/>
CryptedJSONdb can store configuration data, update settings, and any other data in JSON format.
<br/>
### Installing
`npm install cryptedjsondb`
### Usage
```javascript
const CryptedJSONdb = require("cryptedjsondb");
const db = new CryptedJSONdb('./data.json', {
    encryption: true,
    key: "your secret key",
    minify: true
});

// set a value
console.log(db.setValue(1000, 'users', 'scar17off', 'balance')); // returns true if set, returns false if it equals it already

// get a value
const value = db.getValue('users', 'scar17off', 'balance');
console.log(value); // 1000

// add a value to arraylist
db.setValue([], "1");
db.addKeyToArr(1, "1");

console.log(db.getPath("users", "scar17off"));
console.log(db.data);

console.log(db.getItemByIndex(0, "1"));
```

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