4.2.1 • Published 1 year ago
pro.db-fork v4.2.1
What is pro.db-fork ?
- 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/
Installation
- You need to install the package on your project
npm install pro.d-fork
yarn add pro.db-fork
Example File
How To Use
const {DB} = require('pro.db-fork');
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.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.
Contact
- Contact With Me Discord :
Ahmdo#1205