1.2.0 • Published 3 years ago

up-devs.db v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Up-Devs.DB is an useful data-base for your projects. Save your datas in JSON files and MongoDB!

  • Easy to use!
  • Has extra methods/properties!
  • Similar to Quick.DB!

Get Started

  • Install the package
npm i up-devs.db

Example

const { MongoDB, JsonDB } = require('up-devs.db');
const db = new MongoDB('mongodb+srv://up-devs/updevs.db')
// or
const db = new JsonDB('updevs-db')

// Setting an object to this database.
db.set('countries', { list: ['Turkey'] }) // 'countries' data: { list: 'Turkey' }

// Pushing an element to this data.
db.push('countries.list', 'USA') // 'countries' data: { list: ['Turkey', 'USA'] }

// Adding to a number to an object.
db.add('countries.count', 206) // 'countries' data: { list: ['Turkey', 'USA'], count: 206  }

// Fetching those datas.
db.fetch('countries.list') // 'countries' data: ['Turkey', 'USA']
db.get('countries.count') // 'countries' data: 206

Support

You can get support for this module in our Discord server