Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@replit/database
Advanced tools
Repl.it Database client is a simple way to use Repl.it Database in your Node.js repls. It uses await/async
.
const Client = require("@replit/database");
const client = new Client();
await Client.set("key", "value");
let key = await Client.get("key");
console.log(key);
class Client(String key?)
The key is the optional custom URL.
Native Functions
These functions are specified in the repl.it DB.
get(String key, Object options?)
Gets a key. Returns Promise.
Client.get("key", { raw: false }).then(console.log);
set(String key, Any value)
Sets a key to value. Returns Client.
delete(String key)
Deletes a key. Returns Client.
list(String? prefix)
Lists all of the keys, or all of the keys starting with prefix
if specifed.
Dynamic Functions
These functions have been added by me.
empty()
Clears the database. Returns Client
getAll()
Get all key/value pairs and return as an object.
setAll(Object obj)
Sets the entire database through a key/value object. Returns Client
deleteMultiple(...String args)
Deletes multiple keys. Returns client.
npm i
npm run test
FAQs
Client for Repl.it Database
The npm package @replit/database receives a total of 1,815 weekly downloads. As such, @replit/database popularity was classified as popular.
We found that @replit/database demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 33 open source maintainers collaborating on the project.
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.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.