Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

replit-store

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

replit-store

Client for the Replit Database

  • 1.0.1
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

npm version

Run on Repl.it

Replit DB client

Replit DB client is a simple way to use Replit's Database in your Node.js repls.

Get started

const { Client } = require("replit-store");
const client = new Client();

client.set("key", "value").then(async () => {
	const key = await client.get("key");
	console.log(key);
});

Docs

class Client(String url?)

The parameter url is an optional custom DB URL.

Functions

These are the methods which a client instance provides.

get(String key, Object config?)

Gets a value.

client.get("key", { raw: false });

set(String key, Any value)

Sets a key to a value.

delete(String key)

Deletes a key.

list(Object config?)

Lists all of the keys, or all of the keys starting with prefix if specifed.

client.list({ prefix: "" });

empty()

Clears the database.

getAll()

Get all key/value pairs and return as an object.

setMany(Object obj)

Sets multiple key/value pairs from an object.

deleteMany(Array keys)

Deletes multiple keys.

Tests

npm i
npm run test

FAQs

Package last updated on 09 Mar 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc