Quick.Replit
What is Quick.Replit?
A quick and easy wraper to interact with the replit database!
Features
- 🧑 Beginner friendly
- 🎉 Easy to use
- 📦 Very similar to quick.db
- 🚀 Import & export support
- 🔑 Key value based
- ✨ Simple
- ⚙️ Asynchronous
- 💥 Events: ready, error, debug
- and much more!
Install
npm install quick.replit
Usage
const { Database } = require("quick.replit");
const db = new Database(process.env.REPLIT_DB_URL)
db.set("foo", "bar").then(() => console.log("ID 'foo' is saved with the value 'bar'!"));
db.get("foo").then(data => {
console.log(data)
});
db.delete("foo").then(() => console.log("ID 'foo' is deleted from the database!"));
db.all().then(data => {
console.log(data)
});
db.add("foo", 1).then(() => console.log("Added +1 to ID 'foo'!"));
});
db.subtract("foo", 1).then(() => console.log("Subtracted 1 from ID 'foo'!"));
});
await db.set("foo", ["bar"])
await db.push("foo", "foo")
await db.pull("foo", "bar")
db.startsWith("money", { sort: ".data" }).then(data => {
console.log(data)
});
db.math("coins", "-", 30).then(() => console.log("Subtracted 30 coins!"));
await db.ping()
db.has("foo").then(data => console.log(data))
Author
👤 Lebyy
🤝 Contributing
Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.
Show your support
Give a ⭐️ if this project helped you!
📝 License
Copyright © 2021 Lebyy.
This project is AGPL--3.0 licensed.