# @eggsnham07/simple-db

> First you must create the database ```javascript const Database = require("@eggsnham07/simple-db"); const db = new Database(); ``` `Database` has 2 parameters, both are optional: - dbName: `string` - opts: - - disableSafeShutdown: `boolean` - - di

Latest version **0.1.3** (published 2023-06-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @eggsnham07/simple-db
pnpm add @eggsnham07/simple-db
yarn add @eggsnham07/simple-db
bun add @eggsnham07/simple-db
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2023-06-06 |
| First published | 2023-06-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 18.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | eggsnham07 |

## Links

- npm: https://www.npmjs.com/package/@eggsnham07/simple-db
- npm.io page: https://npm.io/package/@eggsnham07/simple-db

## Dependencies (1)

- [@types/node](https://npm.io/package/@types/node.md) ^20.2.5

## Recent versions

- 0.1.3 (latest) — 2023-06-06
- 0.1.2 — 2023-06-06
- 0.1.1 — 2023-06-06
- 0.0.3 — 2023-06-06
- 0.0.2 — 2023-06-06

## README

## How to use:
First you must create the database
```javascript
const Database = require("@eggsnham07/simple-db");
const db = new Database(<dbName>);
```
`Database` has 2 parameters, both are optional:
- dbName: `string`
- opts:
- - disableSafeShutdown: `boolean`
- - disableDbRestore: `boolean`
### Setting database items
```javascript
db.set(key: string, value: any) -> void
```
Example:
```javascript
db.set("user_count", 135);
```
### Getting database items
```javascript
db.get(key: string) -> any
```
Example
```javascript
console.log(db.get("user_count"));
```
> Output: `135`

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