1.0.1 • Published 2 years ago

exact.db v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 years ago

Exact.DB

Setup

First we need to install the package!

For npm use

npm install exact.db

For yarn use

yarn add exact.db

Now we need to setup our variables and call the package

const Database = require('exact.db')
const db = new Database('json-file-name-here')

Example

const Database = require('exact.db')
const db = new Database('./Data/database.json')

.set

Use .set to put a value into the database that can be called using the key

db.set('key', 'value')

.delete

Use .delete to delete a value and a key using the key

db.delete('key')

.deleteAll

Use .deleteAll to completely wipe your database and restore it to brand new

db.deleteAll()

.fetch

Use .fetch to get the a value from the database using the key

db.fetch('key')

I do not own the JSON banner at the top all credit for that goes to https://coursework.vschool.io/jsons-deli/

1.0.1

2 years ago

1.0.0

3 years ago