1.0.3 • Published 3 years ago

cleverdb v1.0.3

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

Cleverdb

cleverdb is here to provide an easy way for beginners and people of all levels to access & store data in a low to medium volume environment

📂 NPM

Example

Javascript

const db = require('cleverdb');

// Setting an object in the database:
db.set('userInfo', { difficulty: 'Easy' })
// -> { difficulty: 'Easy' }

// Pushing an element to an array (that doesn't exist yet) in an object:
db.push('userInfo.items', 'Sword')
// -> { difficulty: 'Easy', items: ['Sword'] }

// Adding to a number (that doesn't exist yet) in an object:
db.add('userInfo.balance', 500)
// -> { difficulty: 'Easy', items: ['Sword'], balance: 500 }

// Repeating previous examples:
db.push('userInfo.items', 'Watch')
// -> { difficulty: 'Easy', items: ['Sword', 'Watch'], balance: 500 }
db.add('userInfo.balance', 500)
// -> { difficulty: 'Easy', items: ['Sword', 'Watch'], balance: 1000 }

// Fetching individual properties
db.get('userInfo.balance') // -> 1000
db.get('userInfo.items') // ['Sword', 'Watch']

Installation

Windows and Linux

  • npm i cleverdb

:D

Feel Free to Use this and you could make your own Db with my Code , and i would not say any thing :)

1.0.3

3 years ago

1.0.2

3 years ago