# tiny-json-db

> A lightweight zero dependency json database

Latest version **0.1.1** (published 2022-02-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install tiny-json-db
pnpm add tiny-json-db
yarn add tiny-json-db
bun add tiny-json-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.1 |
| Published | 2022-02-26 |
| First published | 2022-02-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Theodore Kakagis |
| Maintainers | theodorekakagis |
| Keywords | database, json, json-db |

## Links

- npm: https://www.npmjs.com/package/tiny-json-db
- Repository: https://github.com/CooldudeNo13026/light-db
- Homepage: https://github.com/CooldudeNo13026/light-db#readme
- Issues: https://github.com/CooldudeNo13026/light-db/issues
- npm.io page: https://npm.io/package/tiny-json-db

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

- 0.1.1 (latest) — 2022-02-26
- 0.1.0 — 2022-02-26

## README

# tiny-json-db

A lightweight zero dependency json database.

## Examples:

### Create an instance:

```js
const Database = require("tiny-json-db");
const db = new Database("database-folder");
```

### Set an item to a value:

```js
// string
await db.setItem("str", "hello, world");
// number
await db.setItem("pi", 3.14);
// object
await db.setItem("user", { name: "John Doe", email: "somebody@example.com" });
```

### Get an item's value:

```js
const str = await db.getItem("str");
```

### Delete an item:

```js
await db.deleteItem("pi");
```

### List all items:

```js
const items = await db.listItems();
```

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