neko-database
v2.0.1
Published
A object oriented database
Downloads
6
Readme
const Database = require("neko-database")
const db = new Database("path/to/database") //leave empty for default path (./database.sqlite)
db.set("items", { swords: 1 }) //supports any data except functions and classes
db.get("items") //returns { swords: 1 }
db.delete("items") //deletes the data from the database permanently
db.set("timeout", true, 60000) //will expire in the database after 60 seconds
db.on("expire", data => {
console.log(`Data has expired:`, data)
}) //emitted when data expires