1.0.1 • Published 2 years ago

tinyramdb v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

tinyramdb

Simple. Fast. Easy.

tinyramdb is a redis clone (TL;DR: a memory-based database), in JavaScript. The only things tinyramdb can do are the following:

  • Initialize databases
  • Set keys' values
  • Update keys' values
  • Delete keys

Example usage

// import the functions
const {INIT, SET, GET, DEL} = require("tinyramdb");
// initialize the database, creates a cache file, this is mandatory
INIT();
// create a key
SET("foo", "bar");
console.log("Contents of foo: " + GET("foo") /* Get the contents of foo */);
// update a key
SET("foo", "baz");
console.log("Contents of foo: " + GET("foo"));
// delete a key
DEL("foo");
console.log("Contents of foo: " + GET("foo"));