Socket
Socket
Sign inDemoInstall

quick.replit

Package Overview
Dependencies
8
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    quick.replit

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


Version published
Maintainers
1
Created

Readme

Source

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.


Keywords

FAQs

Last updated on 16 Apr 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc