# @mybadprojects/jsondb

> A json based database which is easy to use and compact. Update: Removed 'database' and 'value'.

Latest version **1.0.4** (published 2021-07-02) · ISC license · 0 weekly downloads

## Install

```sh
npm install @mybadprojects/jsondb
pnpm add @mybadprojects/jsondb
yarn add @mybadprojects/jsondb
bun add @mybadprojects/jsondb
```

## 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.0.4 |
| Published | 2021-07-02 |
| First published | 2021-06-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | mybadprojects |

## Links

- npm: https://www.npmjs.com/package/@mybadprojects/jsondb
- npm.io page: https://npm.io/package/@mybadprojects/jsondb

## Recent versions

- 1.0.4 (latest) — 2021-07-02
- 1.0.3 — 2021-07-02
- 1.0.2 — 2021-07-02
- 1.0.1 — 2021-06-29
- 1.0.0 — 2021-06-29

## README

# JsonDB

A simple JSON powered database package. This is a simplistic package made for people who do not want to learn actual databases! 

## Documentation

### createDatabase

`createDatabase`: Creates a JsonDB `string` instance and calls back the database.

#### **Usage**

```javascript
JsonDB.createDatabase('userInformation', 'contains user information', (database) => {
});
```

### getValue

`getValue`: Gets a value from the database.

#### **Usage**

```javascript
let value1 = JsonDB.getValue(database, 'valueName')
```

### removeValue

`removeValue`: Removes the value determined.

#### **Usage**

```javascript
JsonDB.removeValue(database, 'valueName', (newDatabase) => { database = newDatabase })
```

### loadDatabase

`loadDatabase`: Loads a database in the **current** folder. To access another folder, put the file's location **without** the extension (`.db.json`).

#### **Usage**

```javascript
JsonDB.loadDatabase('userInformation', (database) => {
});
```

### saveDatabase

`saveDatabase`: Saves the database, requires no callbacks. 

###### **SAVES TO THE FILE DEPENDING ON DATABASE NAME**

#### **Usage**

```javascript
JsonDB.saveDatabase(database)
```

### setValue

`setValue`: Sets the value of an object.

#### **Usage**

```javascript
JsonDB.setValue(database, 'valueName', 'value', (newDatabase) => { database = newDatabase })
```

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