A simple JSON-based database package for Node.js, designed to provide easy key-value storage with automatic file persistence.
npm install @darkkdev/dark.dbconst { Data, Driver } = require('@darkkdev/dark.db');
const db = new Data({ driver: new Driver('database.json') });Stores a value in the database.
db.set('username', 'Dark Dev');Retrieves a value from the database.
console.log(db.get('username')); // Output: Dark DevDeletes a key from the database.
db.delete('username');Checks if a key exists.
console.log(db.has('username')); // Output: falsePushes a value into an array stored at the key.
db.push('users', 'user1');
console.log(db.get('users')); // Output: ['user1']This project is licensed under the MIT License.
Github : Click Here Website : Click Here
Github : Click Here