# tinyjsondatabase

> Tiny and easy json database.

Latest version **0.0.2** (published 2022-11-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install tinyjsondatabase
pnpm add tinyjsondatabase
yarn add tinyjsondatabase
bun add tinyjsondatabase
```

## 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.0.2 |
| Published | 2022-11-26 |
| First published | 2022-11-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ismailaydinlik |
| Maintainers | ismailaydinlik |
| Keywords | json, database, jsondb, easy, json database, easy database |

## Links

- npm: https://www.npmjs.com/package/tinyjsondatabase
- npm.io page: https://npm.io/package/tinyjsondatabase

## 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.0.2 (latest) — 2022-11-26
- 0.0.1 — 2022-11-26

## README

# Tiny Json Database

This is **tinyjsondatabase**. Its very simple database for your projects. 

## Functions

| Function | Type     | Description                       |
| :-------- | :------- | :-------------------------------- |
| `setPath(path)`      | `string` | Sets database path. |
| `setLogging(bool)`      | `bool` | Enables or disables logging. |
| `set(data, value)`      | `string` | Sets data. |
| `get(data)`      | `string` | Gets data. |
| `delete(data)`      | `string` | Deletes data. |
| `check(data)`      | `string` | Checks data. |


  
## Example Code

```javascript
const db = require("tinyjsondatabase");

// Set database path
db.setPath("database.json")

// Enable logging
db.setLogging(true)

// Set "Hello" to "World!"
db.set("Hello", "World!")

// Get "Hello" from database
db.get("Hello") // returns "World!"

// Delete "Hello" from database
db.delete("Hello")

// Check "Hello" from database
db.check("Hello") // returns false because we deleted it.
```

## Example Console

```
-- CREATING FILE
SUCCESS! File created automatically. || SUCCESS! File found.

-- IF LOGGING IS TRUE
SUCCESS! data set to value.
ERROR! data not found in database.
SUCCESS! data removed from database.
```

  
  
## Links

- [Instagram](https://instagram.com/ismaiwz)
- [Discord](https://discord.gg/sQn2XukPWt)
- [Buy me a coffe](https://www.buymeacoffee.com/ismailaydinlik)

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