1.0.2 • Published 5 years ago

punnydb v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
5 years ago

What is this?

This is a simple and small database designed to store your data locally on you nodeJS server in a Bucket-Tag-Value order. So it's very easy to use and understand. Also this is made on FFO system designed by Ct tricks -AKA- Tanish Raj, which makes it more different from another local database made on JSON or other file structure. Normally, it's better to use it for your little projects, but you are free to push the limits.

Installation

'npm i punnydb'

Now here are some examples to use punnydb in your project. const PunnyDB = require('punnydb')

Features

  • Create Bucket
  • Store/Update data.
  • Get data by tag
  • Get list of all tags.
  • Get Value of a tag.
  • Remove a tag from the bucket
  • Clear the bucket. It'll remove all tags and there values stored in that bucket.

Craete a new bucket.

var response = PunnyDB.bucket('My_Bucket'); console.log(response'tag1');

it'll return JSON like { status: true, text: 'Bucket is set to My_Bucket' } Note : If you don't pass the bucket name then it'll return you the active bucket name.

Store/Update a tag.

var response = PunnyDB.tag('tag1','Hello Ct'); console.log(response'tag1');

it'll return JSON like { status: true, text: 'Value stored successfully' }

Get value of a tag.

var response = PunnyDB.tag('tag1'); console.log(response'tag1');

it'll return JSON like { status: true, text: 'Hello Ct' }

Get all tags.

var response = PunnyDB.all_tags(); console.log(response'tag1');

it'll return JSON like { status: true, text: 'tag1','tag2' }

Remove a tag.

var response = PunnyDB.remove_tag('tag1'); console.log(response'tag1');

it'll return JSON like { status: true, text: 'tag removed successfully' }

Clear/remove all tags from a bucket

var response = PunnyDB.clear_all(); console.log(response'tag1');

it'll return JSON like { status: true, text: 'Bucket1 cleared successfully' }

Contact

Email : help.cttricks@gmail.com Twitter : https://twitter.com/ct_tricks Webiste : https://cttricks.com

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago