tinyramdb

1.0.1 • Public • Published

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"));

Readme

Keywords

none

Package Sidebar

Install

npm i tinyramdb

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

2.05 kB

Total Files

4

Last publish

Collaborators

  • brahmasharma