# simple-pseudo-db

> A small scale pseudo database

Latest version **1.0.0** (published 2022-08-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install simple-pseudo-db
pnpm add simple-pseudo-db
yarn add simple-pseudo-db
bun add simple-pseudo-db
```

## 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.0 |
| Published | 2022-08-24 |
| First published | 2022-08-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | OsakiTsukiko |
| Maintainers | osakitsukiko |
| Keywords | pseudo-db, pseudo, db, database |

## Links

- npm: https://www.npmjs.com/package/simple-pseudo-db
- Repository: https://github.com/OsakiTsukiko/pseudo-db
- Homepage: https://github.com/OsakiTsukiko/pseudo-db#readme
- Issues: https://github.com/OsakiTsukiko/pseudo-db/issues
- npm.io page: https://npm.io/package/simple-pseudo-db

## Alternatives

- [angular-pipes](https://npm.io/package/angular-pipes.md) — 5.6K weekly downloads
- [@ng-web-apis/midi](https://npm.io/package/@ng-web-apis/midi.md) — 2.6K weekly downloads
- [happn-3](https://npm.io/package/happn-3.md) — 1.6K weekly downloads
- [@opensip-cli/lang-go](https://npm.io/package/@opensip-cli/lang-go.md) — 1.2K weekly downloads
- [mongoose-typescript](https://npm.io/package/mongoose-typescript.md) — 85 weekly downloads

## Recent versions

- 1.0.0 (latest) — 2022-08-24
- 0.1.5 — 2022-08-22
- 0.1.4 — 2022-08-22
- 0.1.3 — 2022-08-22
- 0.1.2 — 2022-08-22
- 0.1.1 — 2022-08-22
- 0.1.0 — 2022-08-22
- 0.0.1 — 2022-08-22

## README

<div align="center">
<h1>PseudoDB</h1>
<h3>Small scale Object DB</h3>
</div>

It basically writes to files locally, all databases are objects and insertions just set properties on those objects. 
Really similar to localstorage in browser.<br><br>
This is just something I made for a project. Im not sure how fast, reliable or secure it is but its really easy to use..<br>
Also, Im not sure how it reacts to large data sets.. so I dont recommend using it for large scale projects.

# Usage

### Install
```bash
npm i simple-pseudo-db
```

### Example
```js
const PDBConnection = require("simple-pseudo-db");

let instance = new PDBConnection("osaki", "password");
instance.createDB("new_db");
instance.insert("new_db", "key", "value");
instance.insert("new_db", "new_key", "new value");
console.log(instance.readDB("new_db"));
```
Output:
```js
{ 
    key: 'value', 
    new_key: 'new value' 
}
```

### Functions
```
createDB (db_name) -> void
readDB (db_name) -> object
deleteDB (db_name) -> void

insert (db_name, key, value) -> void
update (db_name, key, new_value) -> void
delete (db_name, key) -> void
query (db_name, key) -> value
includes (db_name, key) -> boolean
```

## Todo: 
- Better Docs
- Ability to delete User

## Useful:
DB files are located in `$HOME/.pseudo-db`

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