# pro.db-mega

> a simple and easy database package make your life easy.

Latest version **1.0.2** (published 2023-09-12) · CC BY-NC-ND 4.0 license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install pro.db-mega
pnpm add pro.db-mega
yarn add pro.db-mega
bun add pro.db-mega
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2023-09-12 |
| First published | 2023-09-11 |
| Weekly downloads | 0 |
| License | CC BY-NC-ND 4.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 18.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | .__.abdalla |
| Maintainers | abdalla_ahmed_52929 |
| Keywords | db, database, json, sql, sqlite |

## Links

- npm: https://www.npmjs.com/package/pro.db-mega
- Repository: https://github.com/abdalla-3077/Pro-db-mega
- Homepage: https://github.com/abdalla-3077/Pro-db-mega#readme
- Issues: https://github.com/abdalla-3077/Pro-db-mega/issues
- npm.io page: https://npm.io/package/pro.db-mega

## Dependencies (3)

- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [cryptr](https://npm.io/package/cryptr.md) ^6.3.0
- [mongoose](https://npm.io/package/mongoose.md) ^7.5.0

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

- 1.0.2 (latest) — 2023-09-12
- 1.0.1 — 2023-09-11
- 1.0.0 — 2023-09-11

## README

<div  align="center">
<p>
<img style="margin-bottom:-6px" src="https://i.ibb.co/gttdg4C/68747470733a2f2f6d656469612e646973636f72646170702e6e65742f6174746163686d656e74732f393135393539393731.png"/>
<a href="https://www.npmjs.com/package/pro.db-mega/" alt="pro.db-fork" /></a>
</p>
</p>
</div>

## What is pro.db-mega ?
- It is a easy and quick storage unit that relies on `objects` to store data in **JSON** format
- BTW THIS IS A FORK ( NOT REAL VERSION ) check it out here [https://www.npmjs.com/package/pro.db/]
- Encrypt-Decrypt data set with SecretKey you can generate SecretKey from [https://generate-random.org/api-token-generator?count=1&length=64&type=mixed-numbers-symbols]


## Installation
- You need to install the package on your project
```sh-session
npm install pro.db-mega
yarn add pro.db-mega
```
## Important Alert ⚠

- The primary secret key is not secure. It is preferable to choose your own secret key

## How To Use
```js
const {DB} = require('pro.db-mega');

const db = new DB({fileName: `database.json`})

await db.set('key','value');// to set a data to database.
await db.get('key');// to get the data by key.
await db.delete('key');// to delete key from database.
await db.has('key','value');// return "true" or "false".

await db.setEncrypted('key','value','code');// to set a data to database. but its Encrypted 
await db.setEncrypted('key','code');// to get the Encrypted data by key.


await db.add('key', 10;);// to add a number to the key.
await db.substract('key', 5);// to subtract a number from the key.
await db.push('key', 10);// to set a data at the end.
await db.math("key","+",5);// to math the numbers.

await db.fetch(); // to fetch the data from database. 
await db.fetchAll();// to fetchAll data.
await db.all();// to get all data in database.

await db.backup("Filename");// to make a backup file.
await db.reset();// to delete all data and database.

await connect("mongoose URL") //Connect mongoose db 
await addMon('key','value')// to set a data to mongoose database.
await getMon('key')// to get the data by key from mongoose db.
await deleteOneMon('key')// to delete key from mongoose database.
await deleteAllMon() // to delete all data and mongoose database.

generateSecretKey() //Gives you a new random secret key



```
## Contact

- Contact With Me Discord : [`.__.abdalla`](https://www.npmjs.com/package/pro.db-mega)

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