# json-db-easier

> simple json database

Latest version **3.2.0** (published 2022-03-24) · MIT license · 0 weekly downloads

## Install

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

## 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 | 3.2.0 |
| Published | 2022-03-24 |
| First published | 2022-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | fightfarewellfearless |
| Maintainers | fightfarewellfearless |
| Keywords | json, database, npm |

## Links

- npm: https://www.npmjs.com/package/json-db-easier
- Issues: https://github.com/fightfarewellfearless/
- npm.io page: https://npm.io/package/json-db-easier

## Dependencies (1)

- [text-encryption](https://npm.io/package/text-encryption.md) latest

## 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

- 3.2.0 (latest) — 2022-03-24
- 3.1.7 — 2022-03-23
- 3.1.6 — 2022-03-23
- 3.1.5 — 2022-03-23
- 3.1.4 — 2022-03-23
- 3.1.3 — 2022-03-23
- 3.1.2 — 2022-03-23
- 3.1.1 — 2022-03-23
- 3.1.0 — 2022-03-23
- 3.0.2 — 2022-03-23
- 3.0.1 — 2022-03-23
- 3.0.0 — 2022-03-11
- 2.2.2 — 2022-03-08
- 2.2.1 — 2022-03-07
- 2.2.0 — 2022-03-07
- … 16 more at https://npm.io/package/json-db-easier/versions

## README

# Simple Database
Save your data with json database
# ⚠️Warning⚠️
**Version 2 or lower will not work with version 3 or higher, to make it work, you need to copy your db.json and paste it in the new table directory, and delete the '"main":' thing, and delete 1 } at the end, and if u use encryption, you need decrypt it, then do the same thing**
Please install the latest package version, because there's so many bug fixes and some addition, thanks for choosing this package :)
## Usage 📌
```js
const Db = require('json-db-easier')
const db = new Db.Create("main", //table is "main" you can make it whatever you want
    {
    path: "./database",
    encryption: "key here" //this is optional, if you don't put this, it'll disabled, else, data encryption will be enabled, if you lost/forgor your key you are lost your data
    })
//set
db.set("name","value")
//get 
db.get("name").value
//delete 
db.delete("name")
//all 
db.all()
//has
db.has("name")
//push
db.push("name","value") // ["value"]
db.push("name","value2") // ["value", "value2"]
//ping
db.ping // return ping in ms
```
## auto backup system 
this db include auto backup system, to enable read this example:
```js
db.autoBackup({
    every: 86400000, //1 day in ms
    path: "./backup"
    })
```
this will create backup file in ur backup directory

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