1.0.0 • Published 3 years ago

astpod.db v1.0.0

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

Author: Astpod

astpod.db

const db = require('astpod.db');

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

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

db.topla('userInfo.balance', 500)
// -> { difficulty: 'Easy', items: ['Sword', 'Watch'], balance: 1000 }

//Database extraction
db.çıkar('userInfo.balance', 500)

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

//Database clear
db.sıfırla('userInfo.balance')

//Database delete
db.sil('userInfo.balance')