New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

transfer-replitdb

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

transfer-replitdb

Transfer your ReplitDB data without completely rewriting your app when moving a project to a different hosting platform.

latest
Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

transfer-replitdb

A node.js module that allows you to effortlessly transfer your ReplitDB data without completely rewriting your app when moving a project to a different hosting platform.

Example

const Database = require("transfer-replitdb")
const db = new Database()

db.set("foo", "bar");

db.get("foo").then(console.log); // bar

Importing data from ReplitDB

db.import("ReplitDB URL")

// Get your ReplitDB url by running `echo $REPLIT_DB_URL` in your old Repl's terminal.

Commands

Import the database

const Database = require("transfer-replitdb")

Create a new database

const db = new Database()

Set a key to a value

db.set("key", "value").then(() => {});

Get a key's value

db.get("key").then(value => {});

Delete a key

db.delete("key").then(() => {});

List all keys

db.list().then(keys => {});

List all keys with a prefix

db.list("prefix").then(matches => {});

Empty the database

db.empty().then(() => {});

Get all keys and values

db.getAll().then(all => {});

Set all keys in the database

db.setAll({ "key": "value" }).then(all => {});

Delete multiple keys

db.deleteMultiple([ "key1", "key2" ]).then(() => {});

Keywords

replit

FAQs

Package last updated on 06 Apr 2021

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