# easy-json-db

> json file storage database

Latest version **1.0.4** (published 2023-02-10) · ISC license · 0 weekly downloads

## Install

```sh
npm install easy-json-db
pnpm add easy-json-db
yarn add easy-json-db
bun add easy-json-db
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2023-02-10 |
| First published | 2023-01-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 28 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | kenny019 |
| Maintainers | kenny019 |
| Keywords | json, db, database, storage, simple, node, nodejs |

## Links

- npm: https://www.npmjs.com/package/easy-json-db
- Repository: https://github.com/kenny019/kenny-db
- Homepage: https://github.com/kenny019/kenny-db#readme
- Issues: https://github.com/kenny019/kenny-db/issues
- npm.io page: https://npm.io/package/easy-json-db

## Dependencies (3)

- [tslib](https://npm.io/package/tslib.md) ^2.5.0
- [chokidar](https://npm.io/package/chokidar.md) ^3.5.3
- [ts-results](https://npm.io/package/ts-results.md) ^3.3.0

## 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.0.4 (latest) — 2023-02-10
- 1.0.3 — 2023-01-30
- 1.0.2 — 2023-01-28
- 1.0.1 — 2023-01-28
- 1.0.0 — 2023-01-28

## README

# easy-json-db

![tests workflow](https://github.com/kenny019/easy-json-db/actions/workflows/tests.yml/badge.svg)

Simple to use JSON file system meant for discord bots. It was designed and built for small and prototype applications.

[Typedocs](https://kenny019.github.io/easy-json-db/)

# Breakdown

### Features

-   Small and lightweight.
-   Typescript typings.
-   Easy to edit raw data.

### Drawbacks

-   Not very performant
-   Minimal features
-   You pledge alliance to the JSON overlords.

# Usage guide

Installation

```
npm install easy-json-db
```

Create a database, insert and read an object

```js
const DBClient = require('easy-json-db');

const db = new DBClient();

const insertResult = db.insert('users', 'Klein', {
	admin: false,
});

if (!insertResult.ok) {
	console.error(insertResult.err);
}

if (insertResult.ok) {
	const getResult = db.get('users', 'Klein');

	const userData = getResult.some ? getResult.val : {};

	console.log(userData);
}
```

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