safronoose
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Safronoose (QOL)

Safronoose is a SQlite npm that uses the self-developed QOL entity. This database offers so many vantages, like persistent storage and so much more. Any issue contact me from Discord: Aidak#0001

Example

const db = require('safronosejs');
 
// Set an object
db.insertObject('key', 'value') // returns -> value
 
// Pushing an element to an array (that doesn't exist yet) in an object:
db.insertMany('userInfo.items', 'Sword')
// -> { difficulty: 'Easy', items: ['Sword'] }
 
// Adding to a number (that doesn't exist yet) in an object:
db.addValue('userInfo.balance', 500)
// -> { difficulty: 'Easy', items: ['Sword'], balance: 500 }
 
// Repeating previous examples:
db.insertMany('userInfo.items', 'Watch')
// -> { difficulty: 'Easy', items: ['Sword', 'Watch'], balance: 500 }
db.addValue('userInfo.balance', 500)
// -> { difficulty: 'Easy', items: ['Sword', 'Watch'], balance: 1000 }
 
// Fetching individual properties
db.findOne('userInfo.balance') // -> 1000
db.get('userInfo.items') // ['Sword', 'Watch']

Installation

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

Linux & Windows

  • npm i safronoose --save

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 safronoose --save

Package Sidebar

Install

npm i safronoose

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

35.1 kB

Total Files

16

Last publish

Collaborators

  • aidakgm