2.0.1 • Published 3 years ago

ash.db v2.0.1

Weekly downloads
4
License
Apache-2.0
Repository
-
Last release
3 years ago

How 2 use this thing?

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

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

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

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

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

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

HOW 2 İNSTALL THİS?

If you're having troubles installing, please follow this troubleshooting guide.

Linux & Windows

  • npm i ash.db

*Note: Windows users may need to do additional steps listed here.*

Mac 1. Install: XCode 2. Run: npm i -g node-gyp in terminal 3. Run: node-gyp --python /path/to/python2.7 (skip this step if you didn't install python 3.x) 4. Run: npm i ash.db

FAQ

1-İs this a Quick.db Copy? Cuz readme.md is are same

no. this readme.md is same kuz we using same things,and its a moded quick.db version.

2-What is the difference between quick.db and ash.db?

There is not much difference in appearance, but technically it is completely different, for example this package uses fs.

2.0

CHANGES

db.get is now same as db.fecth

now using node 10

2.0.1

CHANGES -added bindings package