Skip to content

Lebyy/quick.replit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Quick.Replit

Discord Version Documentation Maintenance License: AGPL--3.0

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!

πŸ“š Documentation

❔ Support

πŸ“‚ NPM

Install

npm install quick.replit

Usage

const { Database } = require("quick.replit");
const db = new Database(process.env.REPLIT_DB_URL)

//Set
db.set("foo", "bar").then(() => console.log("ID 'foo' is saved with the value 'bar'!"));

//Get
db.get("foo").then(data => {
  console.log(data) // Logs 'bar'
});

//Delete
db.delete("foo").then(() => console.log("ID 'foo' is deleted from the database!"));

//All
db.all().then(data => {
  console.log(data) // Logs all of the data with their key's in array form
});

//Add
db.add("foo", 1).then(() => console.log("Added +1 to ID 'foo'!"));
});

//Subtract
db.subtract("foo", 1).then(() => console.log("Subtracted 1 from ID 'foo'!"));
});

//Push
await db.set("foo", ["bar"]) // -> ["bar"]
await db.push("foo", "foo") // -> ["bar", "foo"]

//Pull
await db.pull("foo", "bar") // -> ["foo"]

//startsWith
db.startsWith("money", { sort: ".data" }).then(data => {
  console.log(data) // Logs all of the data present which starts with the ID 'money' in array form!
});

//Math
db.math("coins", "-", 30).then(() => console.log("Subtracted 30 coins!")); // operand: /, +, *, -, "add", "plus", "subtract", "minus", "mul", "multiply", "div", "divide"

//Ping
await db.ping() // Returns a object which contains the write, read, delete and average latencies!

//Has
db.has("foo").then(data => console.log(data)) // -> true || false

// Even more methods and events are listed in our documentation! Make sure to check them out at https://quickreplit.js.org

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!

Buy Me A Coffee Buy Me a Coffee at ko-fi.com

πŸ“ License

Copyright Β© 2021 Lebyy.
This project is AGPL--3.0 licensed.


About

A quick and easy wraper to interact with the replit database!

Resources

License

Stars

Watchers

Forks

Sponsor this project

  •  

Packages